Skip to content

FiniteGamepadKeyState

The FiniteGamepadKeyState struct stores information about the state of a specific button on the controller.

typedef struct {
uint16_t id;
bool isHeld;
bool isDown;
bool isUp;
} FiniteGamepadKeyState;
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.