Expand description
Key bindings, chord detection, analog axes, and input action system.
This module provides a flexible input mapping layer on top of the raw
key/mouse state in InputState. Features:
- Named actions mapped to one or more keys/mouse buttons
- Chord bindings (require multiple simultaneous keys)
- Analog axes mapped from key pairs or mouse motion
- Binding groups (menu, gameplay, debug) with independent enable states
- Serialization-friendly action names for config files
Structs§
- Axis
Binding - An analog axis bound to a name.
- Binding
- A single key binding entry.
- Binding
Conflict - A binding conflict: two actions share the same key within the same group.
- Binding
Group - A named group of bindings that can be enabled/disabled as a unit. Useful for switching between gameplay mode and menu mode.
- Chord
Binding - A chord is a sequence of keys pressed within a time window.
E.g., pressing
Up Up Down Downwithin 1 second fires the “konami_start” action. - KeyBindings
- Central key binding registry.
Enums§
- Axis
Source - Source for an analog axis value.
- Trigger
- When an action triggers relative to the key state.
Functions§
- chaos_
rpg_ defaults - Default CHAOS RPG gameplay bindings.
- detect_
conflicts - Detect all conflicts in a
KeyBindingsinstance. - minimal_
bindings - Minimal test/debug binding profile.
Type Aliases§
- Action
- A named action identifier. Actions are the canonical input “nouns” that game logic listens to instead of raw key codes.