Skip to content

textmode.js / input / gamepad

gamepad

Types and interfaces for gamepad event handling

Interfaces

InterfaceDescription
GamepadAxisEventDataAxis change payload emitted when an axis crosses configured thresholds.
GamepadButtonEventDataButton edge payload emitted when a button crosses configured thresholds.
GamepadConnectionEventDataConnection lifecycle payload emitted by the gamepad manager.
GamepadEventMapEvent map for all gamepad events emitted by the GamepadInput.
TextmodeGamepadButtonSnapshotImmutable snapshot of a single gamepad button for the current frame.
TextmodeGamepadSnapshotImmutable frame snapshot for a connected gamepad.
TextmodeGamepadStickSnapshotNormalized two-axis stick state for standard-mapped controllers.
TextmodeStandardGamepadSnapshotSemantic helpers derived from the browser's standard gamepad mapping.

Type Aliases

Type AliasDescription
GamepadAxisEventHandlerGamepad axis event handler.
GamepadButtonEventHandlerGamepad button event handler.
GamepadConnectionEventHandlerGamepad connection event handler.
TextmodeStandardAxisNameSemantic axis names exposed for standard-mapped controllers.
TextmodeStandardButtonNameSemantic button names exposed for standard-mapped controllers.

Variables

VariableDescription
GAMEPAD_EVENT_NAMESGamepad event names supported by the shared input event API.