Function in ldk_os.h

ldk_os_keyboard_key_down

Test whether the key was pressed during the current input update.

LDK_API bool ldk_os_keyboard_key_down(
 LDKKeyboardState *state,
 LDKKeycode keycode
);

Parameters

LDKKeyboardState *state
Input snapshot or state object to query.
LDKKeycode keycode
Keyboard key to query.

Returns

True if the operation succeeds; false otherwise.

Function in ldk_os.h

ldk_os_keyboard_key_is_pressed

Test whether the key is currently held.

LDK_API bool ldk_os_keyboard_key_is_pressed(
 LDKKeyboardState *state,
 LDKKeycode keycode
);

Parameters

LDKKeyboardState *state
Input snapshot or state object to query.
LDKKeycode keycode
Keyboard key to query.

Returns

True when the queried condition holds; false otherwise.

Function in ldk_os.h

ldk_os_keyboard_key_up

Test whether the key was released during the current input update.

LDK_API bool ldk_os_keyboard_key_up(
 LDKKeyboardState *state,
 LDKKeycode keycode
);

Parameters

LDKKeyboardState *state
Input snapshot or state object to query.
LDKKeycode keycode
Keyboard key to query.

Returns

True if the operation succeeds; false otherwise.