Most recent keydown event.
Most recent keyup event.
Last mousedown event.
Last mouseup event.
Previous mouse position.
Most recent mousedown event.
Most recent mouseup event.
Mouse movement delta.
Current mouse position.
Current wheel scroll delta.
Accumulated wheel offsets.
True if key is currently pressed.
The key value (event.key), e.g., 'a', 'ArrowRight', ' ' for space
True if key is not pressed.
The key value (event.key), e.g., 'a', 'ArrowRight', ' ' for space
Staticget
Singleton input manager for keyboard, mouse, and wheel events. Tracks current input state for polling-based input handling.
Key Format
Keys are identified by
event.key(the character or key name), NOTevent.code(physical key).Common key values:
See
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values
Example