Skip to main content

Module input

Module input 

Source

Structs§

GamepadId
Opaque gamepad handle. Backend-local index, stable for the connection lifetime. Survives across frames; invalid after GamepadEvent::Disconnected.
KeyEvent
Modifiers
PointerEvent
PointerId
SensorSample
One reading from a motion sensor, in the device frame.
TextInputEvent

Enums§

GamepadAxis
Analog axes, normalized to -1.0..=1.0. Triggers report 0.0..=1.0.
GamepadButton
Standard-layout buttons (SDL gamecontroller mapping positions). Backends translate hardware codes to these; unknown buttons are dropped.
GamepadEvent
ImeEvent
InputEvent
InputMode
Key
KeyEventType
PhysicalKey
Physical key position, layout-independent (W3C KeyboardEvent.code)
PointerButton
PointerEventKind
PointerEventPass
PointerKind
ScrollSource
What produced a scroll delta.
SensorKind
Motion sensor a gamepad can report.

Functions§

input_mode
Current input mode (Compose InputModeManager.inputMode).
is_focus_visible
true when 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 true if the mode changed.
set_input_mode_default
Force the global default input mode and request a frame.