The keyboard MIDI driver doesn’t watch for the space bar. Its behavior is defined in this file. If you forked this driver, you could make your own version which watches for GLFW_KEY_SPACE, and then you could code your module to output a gate when it is pressed (something like MIDI-CV or MIDI-GATE). Or you could just use one of those two modules in conjunction with your plugin’s MIDI driver. You won’t actually be able to implement your own MIDI driver in a plugin until Rack v2, though:
Out of curiosity I tried simply replacing GLFW_KEY_Z with GLFW_KEY_SPACE in keyboard.cpp and building Rack. As expected this maps Space to MIDI note C (previously mapped to the Z key), allowing MIDI-CV and MIDI-GATE to output a gate when it is pressed. So, for your own use before Rack v2, you could simply do something like this.