> ## Documentation Index
> Fetch the complete documentation index at: https://herm.liftaris.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Keyboard shortcuts and key rebinding in Herm terminal UI

> View default Herm shortcuts, understand the leader-key prefix, and remap chords with /keys.

Herm actions use named key chords. The default leader prefix is `Ctrl+X`; press it first, then press the action key. Use `/keys` to inspect or remap shortcuts. Changes persist in `~/.hermes/herm/tui.json`.

## Opening the keybinding editor

<Steps>
  <Step title="Open /keys from the composer">
    Type `/keys` in the composer and press `Return`. The keybinding editor opens as an overlay.
  </Step>

  <Step title="Browse and select an action">
    Use the arrow keys to scroll through the action list. Each row shows the action name, its current chord, and a short description.
  </Step>

  <Step title="Press the new chord">
    Highlight the action you want to change and press the key or sequence you want to assign. Herm records the chord immediately.
  </Step>

  <Step title="Changes save automatically">
    Your rebindings are written to `~/.hermes/herm/tui.json` as soon as you make them. There is no separate save step.
  </Step>
</Steps>

Press `F1` to open a read-only shortcut reference.

## The leader key

The **leader key** is a two-stroke prefix that gates a large set of session and UI actions. It works like Vim's leader or tmux's prefix: you press the leader first, release it, then press the action key. The default leader is `Ctrl+X`.

For example, the default binding to open a new session is `<leader>n`, which means: press `Ctrl+X`, then press `n`.

The leader key itself is rebindable: change the `leader` action in `/keys` to any chord you prefer. A popular alternative is `Ctrl+\` for users who find `Ctrl+X` conflicts with their readline habits.

<Note>
  Secondary alternates are shown in parentheses throughout the table below. For example, `editor.open` advertises `<leader>e` but also accepts `Ctrl+G` as a fallback so existing muscle memory keeps working while you learn the leader pattern.
</Note>

## OpenCode-compatible bindings

If you are migrating from OpenCode, Herm ships a compatible binding preset. Run `/keys` and look for the **OpenCode** import option to apply those chords in one step without remapping each action individually.

## Default keybindings

The following reference is generated from `src/keys/catalog.ts` in the Herm source repo.

### Global

| Action              | Default chord        | Description                            |
| ------------------- | -------------------- | -------------------------------------- |
| `leader`            | `ctrl+x`             | Leader prefix                          |
| `app.exit`          | `ctrl+c`             | Quit                                   |
| `input.clear`       | `ctrl+c`             | Clear input                            |
| `app.suspend`       | `ctrl+z`             | Suspend to shell                       |
| `app.redraw`        | `ctrl+l`             | Clear & force-repaint terminal         |
| `app.sidebar`       | `<leader>b`          | Toggle sidebar                         |
| `palette.open`      | `ctrl+k`             | Command palette                        |
| `help.open`         | `f1`                 | Keyboard shortcuts                     |
| `tab.next`          | `alt+right`          | Next tab                               |
| `tab.prev`          | `alt+left`           | Previous tab                           |
| `focus.cycle`       | `tab`                | Cycle focus (double-tap → composer)    |
| `editor.open`       | `<leader>e / ctrl+g` | Open \$EDITOR on prompt                |
| `reply.copy`        | `<leader>y / ctrl+y` | Copy last assistant reply              |
| `clipboard.attach`  | `ctrl+v`             | Attach clipboard image                 |
| `queue.flush`       | `<leader>u`          | Interrupt and send queued now          |
| `session.interrupt` | `escape`             | Interrupt (double-tap while streaming) |
| `session.new`       | `<leader>n`          | New session                            |
| `session.redo`      | `<leader>r`          | Redo last undo                         |
| `session.compress`  | `<leader>c`          | Compress context                       |
| `session.steer`     | `<leader>s`          | Steer active turn                      |
| `input.stash`       | `<leader>p`          | Stash prompt draft                     |
| `session.timeline`  | `<leader>g`          | Session timeline                       |
| `theme.pick`        | `<leader>t`          | Switch theme                           |
| `model.pick`        | `<leader>m`          | Switch model                           |
| `status.open`       | `<leader>i`          | Show status                            |

### List

| Action          | Default chord | Description         |
| --------------- | ------------- | ------------------- |
| `list.up`       | `up`          | Move selection up   |
| `list.down`     | `down`        | Move selection down |
| `list.pageUp`   | `pageup`      | Page up             |
| `list.pageDown` | `pagedown`    | Page down           |
| `list.home`     | `home`        | First item          |
| `list.end`      | `end`         | Last item           |
| `list.activate` | `return`      | Activate / open     |
| `list.delete`   | `d / delete`  | Delete item         |
| `list.refresh`  | `r`           | Reload              |
| `list.new`      | `n`           | Create              |
| `list.search`   | `/`           | Filter              |
| `list.toggle`   | `space`       | Toggle item         |

### Dialog

| Action           | Default chord | Description    |
| ---------------- | ------------- | -------------- |
| `dialog.accept`  | `return`      | Accept         |
| `dialog.cancel`  | `escape`      | Cancel / close |
| `dialog.confirm` | `y`           | Yes            |
| `dialog.deny`    | `n`           | No             |
| `dialog.copy`    | `c`           | Copy body      |

### Composer

| Action          | Default chord                                      | Description    |
| --------------- | -------------------------------------------------- | -------------- |
| `input.submit`  | `return`                                           | Send           |
| `input.newline` | `shift+return / ctrl+return / alt+return / ctrl+j` | Insert newline |

### Sessions

| Action            | Default chord | Description            |
| ----------------- | ------------- | ---------------------- |
| `sessions.rename` | `ctrl+r`      | Retitle session        |
| `sessions.prev`   | `left`        | Previous source filter |
| `sessions.next`   | `right`       | Next source filter     |

### Agents

| Action           | Default chord | Description          |
| ---------------- | ------------- | -------------------- |
| `agents.kill`    | `k`           | Kill subagent        |
| `agents.history` | `h`           | Spawn history        |
| `agents.install` | `i`           | Install distribution |

### Config

| Action        | Default chord | Description        |
| ------------- | ------------- | ------------------ |
| `config.save` | `ctrl+s`      | Write config       |
| `config.mode` | `m`           | Toggle form ↔ YAML |

### Eikon

| Action       | Default chord | Description |
| ------------ | ------------- | ----------- |
| `eikon.save` | `ctrl+s`      | Save eikon  |

## Where rebindings are saved

Customized chords are stored in:

```text theme={null}
~/.hermes/herm/tui.json
```

You can inspect this file to see only your overrides: actions you have not changed are not written, so the file stays small. Deleting an entry from the file reverts that action to its default chord on the next launch.

## Related docs

* [Themes](/customization/themes)
* [Slash commands](/customization/slash-commands)
* [Quickstart](/quickstart)
