Virtual Keys
Virtual Keys¶
Virtual Keys are the abstract input actions the project responds to — confirm, cancel, menu, the directional movement keys, and any other system-level input the player can perform. Each virtual key defines an ID, a name, the scripts that run when it is pressed, held, and released, and the physical input mappings (keyboard, mouse, touch, gamepad) that activate it.
Virtual Keys are the layer that decouples physical input from game logic. Scripts and systems react to virtual keys, never to a specific keyboard key or gamepad button, which is what allows players to remap controls and what lets the same in-game action be triggered from any supported input source.
Note: A handful of Virtual Keys are reserved as system actions and cannot be deleted or scripted — they are owned by the engine itself for core navigation and input handling. Custom virtual keys can be added freely on top of these for any project-specific actions that need their own scripts or remappable bindings.
Note: Virtual Keys can run three separate scripts: Enter when the key is first pressed, Ongoing while it is held, and Exit when it is released. They can also be configured to ignore input blocks (so that critical actions still work when controls are otherwise frozen) and to require a key release before they fire again, which prevents continuous re-triggering when a key is held down.
Properties¶
System¶
| Name | Explanation | Type |
|---|---|---|
| Enter Script | The script executed when the virtual key is activated. | Script |
| Exit Script | The script executed when the virtual key is deactivated. | Script |
| ID | The ID of the virtual key. | Number |
| Mutually Exclusive | Commands that cannot be active simultaneously. | |
| Name | The name of the virtual key. | String |
| Ongoing Script | The script that runs continuously while active. | Script |
Details¶
| Name | Explanation | Type |
|---|---|---|
| Cooldown | The duration before the virtual key is registered again, in milliseconds. | Number |
| Ignore Input Blocks | Whether the virtual key ignores input blockers and works even when controls are frozen. | Toggle |
| Require Key Release | Whether the virtual key requires a key release before it registers again. | Toggle |