it is best to have both, one cannot replace the other.
the voicings used on each instrument make that obvious: on keys it's often an octave in the bass and the upper chord is structured in thirds (good luck fretting that on a guitar), while chords on a guitar (in standard tuning) rely mostly on fourths and fifths (the g-b pair of strings being the exception).
This is partially why piano played on guitar and guitar played on a keyboard will always sound off.
The interface influences the outcome quite audibly.
I guess it depends what you want the midi interface for though.If its for live work to replace a layered keyboard then that would be difficult but for single note stuff and simple one position chord work it should be fine.