Add Keyboard object to your project.
Add event:
Keyboard -> On key pressed (Space)
Note, that "On key pressed" and "Is key down" events are different.
If you need the action to be executed once, use "On" event. If you want it to continue executing while the key is down, use "Is" event.