# Lock mode (/docs/v0.1/using/lock-mode)



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

## Toggle from the keyboard [#toggle-from-the-keyboard]

Press <kbd>\<C-l></kbd> to lock. Press it again to unlock.

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:

| Keys              | Action                      |
| ----------------- | --------------------------- |
| <kbd>\<C-l></kbd> | Unlock                      |
| <kbd>\<C-q></kbd> | Quit                        |
| <kbd>\<C-g></kbd> | Toggle mouse-selection mode |

## Control one client from a shell [#control-one-client-from-a-shell]

```bash
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.

## Add another unlock chord [#add-another-unlock-chord]

`unlock-alternative` adds a second escape without replacing
<kbd>\<C-l></kbd>:

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

Run `koshi keys conflicts` after changing locked-mode bindings.
