# Koshi 0.6.0 — Default keymap (/docs/v0.6/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>s</kbd>                          | New pane in the focused pane's stack              |
| <kbd>\<C-p></kbd> <kbd>f</kbd>                          | New floating pane                                 |
| <kbd>\<C-p></kbd> <kbd>u</kbd>                          | Float the focused pane, or dock it when it floats |
| <kbd>\<C-p></kbd> <kbd>i</kbd>                          | Pin or unpin the focused floating pane            |
| <kbd>\<C-p></kbd> <kbd>Tab</kbd> / <kbd>Shift+Tab</kbd> | Show and focus the next / previous floating pane  |
| <kbd>\<C-p></kbd> <kbd>w</kbd>                          | Open or close the floating pane tray              |
| <kbd>\<C-p></kbd> <kbd>m</kbd>                          | Move an existing pane                             |
| <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>Alt+n</kbd>                                        | Open or close the notification center             |
| <kbd>Tab</kbd>                                          | Next tab                                          |
| <kbd>Shift+Tab</kbd>                                    | Previous tab                                      |

Focus, resize, and floating-pane focus actions repeat from an open prefix:
<kbd>\<C-s></kbd> <kbd>←</kbd> <kbd>←</kbd> <kbd>←</kbd> moves the
border three cells, and <kbd>\<C-p></kbd> <kbd>Tab</kbd> <kbd>Tab</kbd>
steps two floating panes. <kbd>Esc</kbd> closes the prefix.

### Move a pane [#move-a-pane]

<kbd>\<C-p></kbd> <kbd>m</kbd> opens the move preview for tiled panes.
When this client shows a floating pane it did not pin, it first opens a
chooser (`MOVE`):

| Keys             | Result                                                                       |
| ---------------- | ---------------------------------------------------------------------------- |
| <kbd>t</kbd>     | Move a tiled pane                                                            |
| <kbd>f</kbd>     | Move a floating pane                                                         |
| <kbd>Enter</kbd> | Move the focused floating pane, or a tiled pane when a tiled pane is focused |
| <kbd>Esc</kbd>   | Cancel                                                                       |

In the tiled move preview:

| Keys                                  | Result                                           |
| ------------------------------------- | ------------------------------------------------ |
| <kbd>←↓↑→</kbd>                       | Choose a pane to swap with                       |
| <kbd>Shift+←↓↑→</kbd>                 | Choose an edge to insert beside a pane or stack  |
| <kbd>s</kbd>                          | Switch the target between the pane and its stack |
| <kbd>Space</kbd>                      | Cycle split spans                                |
| <kbd>Tab</kbd> / <kbd>Shift+Tab</kbd> | Preview the next / previous visible tab          |
| <kbd>Enter</kbd>                      | Accept the move                                  |
| <kbd>Esc</kbd>                        | Cancel the preview                               |

The preview appears only on the client that started the move. Every attached
client sees the changed layout after it is accepted. You can also drag a pane;
hold Shift when starting the drag to insert it beside the target.

In floating pane move mode (`MOVE FLOAT`):

| Keys                                  | Result                                   |
| ------------------------------------- | ---------------------------------------- |
| <kbd>←↓↑→</kbd>                       | Move the selected floating pane one cell |
| <kbd>Tab</kbd> / <kbd>Shift+Tab</kbd> | Select the next / previous floating pane |
| <kbd>Enter</kbd>                      | Accept the move                          |
| <kbd>Esc</kbd>                        | Discard the move                         |

A floating pane move changes only this client's view.

### Floating pane tray [#floating-pane-tray]

After <kbd>\<C-p></kbd> <kbd>w</kbd> (`TRAY`):

| Keys                                             | Result                                                                           |
| ------------------------------------------------ | -------------------------------------------------------------------------------- |
| <kbd>←↓↑→</kbd>                                  | Select a tile                                                                    |
| <kbd>Enter</kbd>                                 | Minimize a shown pane, show a minimized one, or create a pane on `+ new`         |
| <kbd>a</kbd>                                     | Minimize every floating pane this client shows, or show them all when none shows |
| <kbd>Esc</kbd> or <kbd>\<C-p></kbd> <kbd>w</kbd> | Close the tray                                                                   |

### Notification center [#notification-center]

After <kbd>Alt+n</kbd> (`NOTIFICATIONS`):

| Keys                               | Result                              |
| ---------------------------------- | ----------------------------------- |
| <kbd>↑</kbd> / <kbd>↓</kbd>        | Select a newer / older notification |
| <kbd>x</kbd>                       | Dismiss the selected notification   |
| <kbd>c</kbd>                       | Clear every notification and close  |
| <kbd>Esc</kbd> or <kbd>Alt+n</kbd> | Close the center                    |

<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. A locked client can start a
move by dragging a pane's grab handle.

## 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.6/configuration/keybinding-kdl) to customize it.
