Skip to content

FiniteKeyState

The FiniteKeyState struct stores the state of a speicific keyboard input

typedef struct {
uint16_t id;
bool isHeld;
bool isDown;
bool isUp;
} FiniteKeyState;
TypeDescription
uint16_t idThe linux evdev code of the given input.
bool isHeldWhether the button is being held down. Acts as combined state of isDown and isUp
bool isDownWhether the button is currently being pressed down.
bool isUpWhether the button is not being pressed down.

FiniteKeyStates should not be created manually. Developers should let finite_input_keyboard_init handle creating and managing the FiniteKeyState of each individual key.