key_pressed
Check whether a press was observed in the current logical tick.
Available as key_pressed after import_globals() or mv.input.key_pressed.
Parameters
name— A key name or aKEY_*constant.
if key_pressed(KEY_SPACE) then play_sound(jump)endRelated: key, key_released.
See the keyboard guide for more examples and limits.