# Default keymap (/docs/v0.4/keybindings/default-keymap)



The default leader is the Ctrl modifier run, so `<leader>p` becomes
<kbd>\<C-p></kbd>.

## Normal mode [#normal-mode]

| Keys                              | Action                                        |
| --------------------------------- | --------------------------------------------- |
| <kbd>\<C-l></kbd>                 | Lock input                                    |
| <kbd>\<C-q></kbd>                 | Quit — leave the session, which keeps running |
| <kbd>\<C-g></kbd>                 | Toggle mouse-selection mode                   |
| <kbd>\<C-p></kbd> <kbd>n</kbd>    | New pane in configured direction              |
| <kbd>\<C-p></kbd> <kbd>h</kbd>    | New pane left                                 |
| <kbd>\<C-p></kbd> <kbd>j</kbd>    | New pane below                                |
| <kbd>\<C-p></kbd> <kbd>k</kbd>    | New pane above                                |
| <kbd>\<C-p></kbd> <kbd>l</kbd>    | New pane right                                |
| <kbd>\<C-p></kbd> <kbd>x</kbd>    | Close pane and its process tree               |
| <kbd>\<C-p></kbd> <kbd>←↓↑→</kbd> | Focus nearby pane                             |
| <kbd>\<C-s></kbd> <kbd>←↓↑→</kbd> | Resize pane one cell                          |
| <kbd>\<C-t></kbd> <kbd>n</kbd>    | New tab                                       |
| <kbd>\<C-t></kbd> <kbd>x</kbd>    | Close tab                                     |
| <kbd>Alt+f</kbd>                  | Toggle pane fullscreen                        |
| <kbd>Tab</kbd>                    | Next tab                                      |
| <kbd>Shift+Tab</kbd>              | Previous tab                                  |

Focus and resize actions repeat from an open prefix:
<kbd>\<C-s></kbd> <kbd>←</kbd> <kbd>←</kbd> <kbd>←</kbd> moves the
border three cells.

<Callout>
  <kbd>\<C-q></kbd> detaches this terminal; it never ends a session on its
  own. With `auto-close-session #true`, it ends the session when no other
  terminal is attached. To end a session whatever that setting says, run
  `koshi kill-session`.
</Callout>

## Locked mode [#locked-mode]

| Keys              | Action                      |
| ----------------- | --------------------------- |
| <kbd>\<C-l></kbd> | Unlock input                |
| <kbd>\<C-q></kbd> | Quit — leave the session    |
| <kbd>\<C-g></kbd> | Toggle mouse-selection mode |

Every other key passes to the focused program.

## Inspect effective bindings [#inspect-effective-bindings]

User config can replace or remove defaults. Check the merged result:

```bash
koshi keys list
koshi keys list --mode normal
koshi keys list --scope default
koshi keys list --scope user
```

See [`keybinding.kdl`](/docs/v0.4/configuration/keybinding-kdl) to customize it.
