Key

Functions for interacting with keyboard inputs.


Is Pressed

is_pressed(scancode: Scancode) bool

Check if a key is currently being held down.

Parameters

  • scancode : The scancode of the key to check.

Returns

bool : True if the key is pressed, otherwise False.


is_pressed(keycode: Keycode) bool

Check if a key is currently being held down.

Parameters

  • keycode : The keycode of the key to check.

Returns

bool : True if the key is pressed, otherwise False.

Is Just Pressed

is_just_pressed(scancode: Scancode) bool

Check if a key was just pressed.

Parameters

  • scancode : The scancode of the key to check.

Returns

bool : True if the key was just pressed, otherwise False.


is_just_pressed(keycode: Keycode) bool

Check if a key was just pressed.

Parameters

  • keycode : The keycode of the key to check.

Returns

bool : True if the key was just pressed, otherwise False.

Is Just Released

is_just_released(scancode: Scancode) bool

Check if a key was just released.

Parameters

  • scancode : The scancode of the key to check.

Returns

bool : True if the key was just released, otherwise False.


is_just_released(keycode: Keycode) bool

Check if a key was just released.

Parameters

  • keycode : The keycode of the key to check.

Returns

bool : True if the key was just released, otherwise False.