Structs§
- Gamepad
Id - Opaque gamepad handle. Backend-local index, stable for the connection
lifetime. Survives across frames; invalid after
GamepadEvent::Disconnected. - KeyEvent
- Modifiers
- Pointer
Event - Pointer
Id - Sensor
Sample - One reading from a motion sensor, in the device frame.
- Text
Input Event
Enums§
- Gamepad
Axis - Analog axes, normalized to -1.0..=1.0. Triggers report 0.0..=1.0.
- Gamepad
Button - Standard-layout buttons (SDL gamecontroller mapping positions). Backends translate hardware codes to these; unknown buttons are dropped.
- Gamepad
Event - ImeEvent
- Input
Event - Input
Mode - Key
- KeyEvent
Type - Physical
Key - Physical key position, layout-independent (W3C
KeyboardEvent.code) - Pointer
Button - Pointer
Event Kind - Pointer
Event Pass - Pointer
Kind - Scroll
Source - What produced a scroll delta.
- Sensor
Kind - Motion sensor a gamepad can report.
Functions§
- input_
mode - Current input mode (Compose
InputModeManager.inputMode). - is_
focus_ visible truewhen focus indication should paint (focused and keyboard mode).- normalize_
device_ name - Lowercases and strips punctuation, so a driver name matches a pad name despite interface suffixes (“Wireless Controller (Vendor: 054c)”).
- request_
input_ mode - Request a new input mode. Returns
trueif the mode changed. - set_
input_ mode_ default - Force the global default input mode and request a frame.