Signature
Usage
Binding Modes
delta — Increment while held
Add a delta value to the actuator each frame while the key is held:
toggle — Toggle between two values on press
Press once to set the first value, press again for the second:
set — Set value while held
Set a fixed value while the key is held, revert when released:
Config
| Field | Type | Default | Description |
|---|---|---|---|
bindings | Record<string, KeyBinding> | required | Key → actuator mapping |
enabled | boolean | true | Enable/disable all bindings |
KeyBinding
Notes
- Key names use
KeyboardEvent.key(lowercase for letters,' 'for space, etc.) - Multiple keys can target the same actuator
- Disabled when
enabled: false— useful for modal UIs