-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration Locks
Everything under "locks" in config.json. This is where you decide which layers can be locked and by what chord – including the themed blocks, which have no keys of their own and exist only through locking.
"locks": {
"oskAutoShow": false,
"triggers": [
{ "chord": "Shift+Shift", "action": "capslock" },
{ "chord": "Mod4+Mod4", "lock": ["Mod4"], "name": "Mod4" },
{ "chord": "Mod3+Mod3", "lock": ["Mod3"], "name": "Mod3" },
{ "chord": "Mod3+F2", "lock": ["Mod5"], "name": "Mathematik" },
{ "chord": "Mod3+F3", "lock": ["Mod6"], "name": "Typografie" },
{ "chord": "Mod3+F4", "lock": ["Mod7"], "name": "Griechisch" },
{ "chord": "Mod3+F5", "lock": ["Mod8"], "name": "Kyrillisch" },
{ "chord": "Mod3+F6", "lock": ["Mod9"], "name": "Extra" },
{ "chord": "Mod3+F7", "lock": ["Shift"], "mode": "toggle", "name": "Shift" },
{ "chord": "Mod3+Tab", "action": "compose" },
{ "chord": "Mod3+Escape", "action": "clearLocks" },
{ "chord": "Mod3+F1", "action": "osk" },
{ "chord": "Mod3+F10", "action": "oneHandedMode" }
]
}false by default. When true, the on-screen keyboard opens automatically while a layer is locked and closes when the lock is released – unless it was already open, in which case it stays. Useful while learning a block.
There is a matching option for compose sequences under compose.oskAutoShow.
Every entry has a "chord" and then either a "lock" or an "action".
Two forms:
-
The same modifier twice –
"Shift+Shift","Mod4+Mod4","Mod3+Mod3"– means the left and right key of that modifier pressed together. -
Held modifiers plus a main key –
"Mod3+F2","Mod3+Escape". Everything but the last part is held; the last part is the main key, written as a virtual-key name without theVK_prefix.
The list of modifiers to lock:
{ "chord": "Mod3+F4", "lock": ["Mod7"], "name": "Griechisch" }
{ "chord": "Mod3+F8", "lock": ["Mod7", "Shift"], "name": "Greek caps" }Allowed are Shift and the Neo modifiers Mod3 through Mod9. Every layer from the second one upwards is therefore lockable, in any combination that a layer actually defines.
Ctrl and Alt cannot be locked, deliberately: a permanently locked Ctrl would capture every application shortcut, and there would be no way left to press the chord that releases it.
-
"replace"(default) – the lock replaces whatever was locked before. Pressing the same trigger again releases it. -
"toggle"– the named modifiers are added to the current lock, or removed from it if already there.
The distinction matters for Shift. The default M3+F7 is a toggle, which is what lets a single trigger reach the second layer of any block: lock Greek, then M3+F7, and you are on layer 14 without holding anything. As a replace trigger it would have thrown the Greek lock away.
The display name in the tray tooltip and in the on-screen keyboard's layer strip. Defaults to the locked modifier set – Mod7+Shift and so on – which is accurate but says nothing about what the layer contains.
A fixed function instead of a lock. Five exist:
| Action | Effect |
|---|---|
"capslock" |
toggle the operating system's Capslock |
"clearLocks" |
release every lock – the panic chord |
"osk" |
show or hide the on-screen keyboard |
"oneHandedMode" |
switch one-handed mode on or off |
"compose" |
start a compose sequence |
Actions are evaluated before the layer is determined, which is the whole point of "compose" being one. Multi_key also sits on layer 3 of the Tab key, but layer 3 is unreachable while a block is locked – so the familiar Mod3+Tab would be lost exactly when you want it. As a trigger it works in every lock state and costs no cell in any layout.
A locked Neo modifier counts as pressed for as long as its key is not held. Holding the key returns you to the unlocked layer for as long as you hold it – so with Mod4 locked, holding Mod4 gets you layer 1 back for a moment.
Shift is the exception. Holding Shift does not lift a Shift lock. Shift stays visible to applications, so Shift-shortcuts and Shift-click keep working while it is locked. Alongside another lock, Shift behaves normally and reaches the second layer of the locked block.
While anything is locked, the tray icon changes colour and its tooltip names the lock. If the on-screen keyboard is open, a strip along its top names the layer, its block and the modifier set – Layer 13 · Griechisch · Mod7.
Inside a locked block, only the extensions that block actually defines reach a layer – +Shift everywhere, plus +Mod3/+Mod4 for maths, typography and extra. Anything else falls back to layer 1 rather than doing nothing. Greek plus held Mod4 types the ordinary character.
This also means special characters and navigation are not available inside a locked block; they live on layers 3 and 4, outside it. M3+Esc releases everything.
The one exception is layer 21, which exempts itself from locking so the compose modifiers stay reachable.
A trigger whose lock has no layer does nothing. Locking Mod6 in a six-layer layout is legal and useless – no layer in Neo, NeoQwertz or Noted mentions Mod6, so nothing changes. The shipped config.[layout].json files therefore only offer triggers that reach a layer, and a test enforces it.
After an update, new triggers do not appear by themselves. Arrays are replaced whole in the merge, so your existing "triggers" array wins entirely. Delete the "triggers" entry – or the whole "locks" block – from your config.json once and restart. See Configuration.
The former option "enableMod4Lock" is gone. It is removed on first start; if it was false, a "locks" section without the Mod4 trigger is written instead.