Yes. You can use GR to process any audio signal whether from a guitar, vocal, virtual instrument, etc.
But, to be clear, if your MiDI keyboard does not produce audio, i.e. it is only a MIDI controller, then GR can not directly process the output (because it is only MIDI notes and no actual audio). In that case there must be a virtual intrument between the controller and GR.