KOSHI0.4.0
Using koshi
v0.4usingfield manual

Lock mode

Pass every key to the focused program, then safely return to koshi shortcuts.

Lock mode stops koshi from interpreting normal shortcuts. Every unreserved key goes straight to the focused program.

Toggle from the keyboard

Press <C-l> to lock. Press it again to unlock. Move that chord with unlock-alternative.

The lock chord is explicit and does not follow the configurable leader. koshi keeps a valid unlock path when loading keybinding.kdl; an invalid locked-mode map is rejected instead of trapping input.

The default locked mode still binds:

KeysAction
<C-l>Unlock
<C-q>Quit — leave the session, which keeps running
<C-g>Toggle mouse-selection mode

Control one client from a shell

koshi lock --client <CLIENT_ID>
koshi unlock --client <CLIENT_ID>
koshi toggle-lock --client <CLIENT_ID>

Lock mode is per client. Locking one attached terminal does not lock another, and each terminal reads its own keybinding.kdl to decide what unlocks it.

Move the unlock chord

unlock-alternative names the chord that leaves locked mode in place of <C-l>. Setting it frees <C-l> to rebind.

keybinding.kdl
version 1
unlock-alternative "<A-u>"

mode "locked" {
    bind "<A-u>" "core:unlock"
}

The whole file is rejected unless the locked block binds this chord to core:unlock — without it the unlock escape would be unreachable. A chord that plain typing produces is rejected too; hold Ctrl, Alt, or Super.

Rebinding <C-l> without declaring unlock-alternative first is refused the same way: koshi keys conflicts reports that the reserved unlock key is bound in locked mode.

Run koshi keys conflicts after changing locked-mode bindings.

On this page