Skip to main content

Module input

Module input 

Source
Expand description

Input handling: keyboard, mouse, and gamepad.

Key advantages over macroquad:

  • Pressed/released detection per frame (macroquad requires manual tracking)
  • Input actions (remappable keybindings with a single name)
  • Mouse gesture detection (drag, click, double-click)
  • Text input support for UI

Access via ctx.input inside your [GameState].

Structs§

InputAction
A named input action that can be bound to multiple keys/buttons.
InputState
Unified input state, accessible via ctx.input.
KeyboardState
Keyboard state for the current frame.
MouseState
Mouse state for the current frame.

Enums§

KeyCode
Physical keyboard key.
MouseButton
Mouse button.