# Koshi 0.5.0 — Actions (/docs/v0.5/keybindings/actions)



A binding names a full action reference such as `core:new-pane-right`. Run:

```bash
koshi actions list
koshi actions explain core:new-pane-right
```

`list` shows actions implemented by the running version. `explain` shows one
action's description, scope, accepted targets, and related CLI command.

## Pane actions [#pane-actions]

| Action                               | Result                                                 |
| ------------------------------------ | ------------------------------------------------------ |
| `core:new-pane`                      | New shell pane in configured direction                 |
| `core:new-pane-left`                 | New shell pane left                                    |
| `core:new-pane-down`                 | New shell pane below                                   |
| `core:new-pane-up`                   | New shell pane above                                   |
| `core:new-pane-right`                | New shell pane right                                   |
| `core:new-pane-stacked`              | Add shell pane to focused stack                        |
| `core:run`                           | Run a command in a new pane                            |
| `core:close-pane`                    | Close focused pane                                     |
| `core:close-pane-tree`               | Close pane and every process it started                |
| `core:resize-pane`                   | Resize along an explicit edge                          |
| `core:resize-pane-left`              | Move border left                                       |
| `core:resize-pane-down`              | Move border down                                       |
| `core:resize-pane-up`                | Move border up                                         |
| `core:resize-pane-right`             | Move border right                                      |
| `core:focus-pane`                    | Focus an explicit pane                                 |
| `core:focus-pane-left`               | Focus pane left                                        |
| `core:focus-pane-down`               | Focus pane below                                       |
| `core:focus-pane-up`                 | Focus pane above                                       |
| `core:focus-pane-right`              | Focus pane right                                       |
| `core:begin-pane-placement`          | Start a local preview for moving a pane                |
| `core:move-pane`                     | Swap a pane with its visible neighbor in one direction |
| `core:place-pane`                    | Insert a pane into another tab's tiled layout          |
| `core:select-pane-target-left`       | Choose the pane to swap with on the left               |
| `core:select-pane-target-down`       | Choose the pane to swap with below                     |
| `core:select-pane-target-up`         | Choose the pane to swap with above                     |
| `core:select-pane-target-right`      | Choose the pane to swap with on the right              |
| `core:select-pane-insertion-left`    | Choose an insertion edge on the left                   |
| `core:select-pane-insertion-down`    | Choose an insertion edge below                         |
| `core:select-pane-insertion-up`      | Choose an insertion edge above                         |
| `core:select-pane-insertion-right`   | Choose an insertion edge on the right                  |
| `core:cycle-pane-placement-span`     | Cycle the split span in the move preview               |
| `core:select-next-placement-tab`     | Preview the next visible tab                           |
| `core:select-previous-placement-tab` | Preview the previous visible tab                       |
| `core:confirm-pane-placement`        | Accept the previewed move                              |
| `core:cancel-pane-placement`         | Cancel the previewed move                              |
| `core:scroll-pane`                   | Scroll a pane's view by a chosen number of lines       |
| `core:scroll-pane-up`                | Scroll the focused pane toward its history             |
| `core:scroll-pane-down`              | Scroll the focused pane toward live output             |
| `core:toggle-pane-fullscreen`        | Toggle focused-pane fullscreen                         |
| `core:write-to-pane`                 | Send text to a pane                                    |

## Tab, session, and client actions [#tab-session-and-client-actions]

| Action              | Result                                       |
| ------------------- | -------------------------------------------- |
| `core:new-tab`      | Create tab                                   |
| `core:close-tab`    | Close focused tab                            |
| `core:focus-tab`    | Focus explicit tab                           |
| `core:next-tab`     | Focus next tab                               |
| `core:previous-tab` | Focus previous tab                           |
| `core:move-tab`     | Move tab to another index                    |
| `core:lock`         | Enable pass-through lock mode                |
| `core:unlock`       | Disable pass-through lock mode               |
| `core:toggle-lock`  | Toggle pass-through lock mode                |
| `core:mouse-select` | Toggle mouse-selection mode                  |
| `core:quit`         | Leave the session; the session keeps running |

<Callout>
  `core:quit` detaches this terminal. It ends the session only when
  `auto-close-session #true` and no other terminal is attached. There is no
  action that ends a session outright — use `koshi kill-session`.
</Callout>

## Binding rules [#binding-rules]

Write the namespace: `core:new-tab`, not `new-tab`. Bindings accept no action
arguments. Fixed choices belong in the action name; open values such as a pane
id, tab index, or text belong to the CLI.

These actions need values that only their CLI command supplies, so a key bound
to one never fires, and `koshi keys validate` and `koshi keys conflicts` warn
about it: `core:run`, `core:resize-pane`, `core:focus-pane`, `core:move-pane`,
`core:place-pane`, `core:scroll-pane`, `core:write-to-pane`, `core:focus-tab`,
and `core:move-tab`.

```kdl title="keybinding.kdl"
version 2

mode "normal" {
    bind "<A-h>" "core:focus-pane-left"
    bind "<A-l>" "core:focus-pane-right"
}
```
