# Keyboard shortcuts

Settings, Keyboard shortcuts. A row reads Open the command palette with the key Command K. Clicking the key turns it into Press keys; pressing Command J there shows Used by New chat with Replace and Cancel under it.

Settings → Keyboard shortcuts. Click a key, press the new one; Esc cancels.

## Change a key

| Where | How |
| --- | --- |
| Web and App | Settings → Keyboard shortcuts, or `/keybindings` in the message input. Search by name or key. The ⋯ menu adds a second key, removes the key or resets the action; Reset all at the top undoes every change. |
| TUI | `/keybindings` or `?` on an empty input lists every action with the keys in force. Enter on one records its new key. |
| Any chat | `/keybindings set ACTION KEYS`, `add ACTION KEYS`, `remove ACTION`, `reset ACTION`, `reset all`; `/keybindings` alone lists what is changed |
| By hand | `~/.openprogram/keybindings.json`, below. Windows that are open pick up the change. |

## A key someone else has

| Case | Result |
| --- | --- |
| A built-in key | The row says who has it. Replace takes it; that action keeps its other keys. |
| Two of your own | From the file, both keep the key and both rows show the conflict until one changes |
| Different places | No conflict: F can find in the conversation and still focus the agent in the run graph |

## The file

```
{
  "app.commandPalette": "mod+p",
  "chat.find": ["mod+f", "ctrl+s"],
  "tabs.reopen": "mod+k mod+t",
  "app.toolsExpand": "ctrl+t",
  "input.queue": "none"
}
```

| Part | Meaning |
| --- | --- |
| `mod` | ⌘ on macOS, Ctrl on Windows and Linux and in every terminal, so one file fits every computer |
| Modifiers | `ctrl`, `alt` (`option`), `shift`, `cmd` (the Windows or Super key off macOS) |
| Two keys | `"mod+k mod+t"`: press one, then the other. The first needs a modifier. Menu items and hold-to-talk take one key. |
| `"none"` | The action has no key |
| One file | The Web UI, the App and the TUI read it; an action only one of them has is left to that one |

A line the file cannot use (an unknown action, an unreadable key) is skipped and the rest applies; the TUI reports it in the transcript. Ctrl+C in the TUI cannot be changed.

[TUI keys and commands](https://openprogram.io/docs/interfaces/tui.html)
