input.on_key_down method
Triggers an event whenever the specified KeyCode is pressed down.
Note: Only one onKeyDown
handler can be defined for a key at any time.
Parameters
-
handler: Callable[[], None]
function to call. Pass
null
to remove the handler. -
key_code: KeyCode
key to press.