keylayer.push
Overview
- Activates a key layer declared in a mod's keylayers.json by putting it on top of the key layer stack (moves it to the top if already active). When keys overlap, the topmost key layer wins. Keys work only in play modes where the hidden UI launcher can be shown (not in the lobby, during loading or in build mode). Key presses arrive as the 'keylayer.input' event. Active key layers are cleared on world change.
Metadata
| Field | Value |
|---|---|
| Display | Push Mod Key Layer |
| Category | keylayer |
| Access | ScriptCheat |
| Scope | B1Standalone |
| Tags | Experimental |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | yes | — | Key layer id from keylayers.json (e.g. myclock.build) |
Returns
Returns a JSON object with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
layer | string | yes | Key layer id |
active | bool | yes | Whether the key layer is on the active stack |
active_count | int | yes | Number of active key layers of all mods |
enabled | bool | yes | Player toggle state of all key layers |
Usage
await inzoi.cli.execute('keylayer.push', {
id: '',
});