Function in ldk.h

ldk_input_keyboard_key_down

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

LDK_API bool ldk_input_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.h

ldk_input_keyboard_key_is_pressed

Test whether the key is currently held.

LDK_API bool ldk_input_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.h

ldk_input_keyboard_key_up

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

LDK_API bool ldk_input_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.

Function in ldk.h

ldk_input_keyboard_state_get

Get the input keyboard state.

LDK_API void ldk_input_keyboard_state_get(LDKKeyboardState *out_state);

Parameters

LDKKeyboardState *out_state
Receives the requested input state snapshot.