Skip to main content

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

FieldValue
DisplayPush Mod Key Layer
Categorykeylayer
AccessScriptCheat
ScopeB1Standalone
TagsExperimental
Aliases—

Parameters

NameTypeRequiredDefaultDescription
idstringyes—Key layer id from keylayers.json (e.g. myclock.build)

Returns

Returns a JSON object with the following fields:

FieldTypeRequiredDescription
layerstringyesKey layer id
activeboolyesWhether the key layer is on the active stack
active_countintyesNumber of active key layers of all mods
enabledboolyesPlayer toggle state of all key layers

Usage

await inzoi.cli.execute('keylayer.push', {
id: '',
});