Keybindings
Claude Code reads your keyboard shortcuts from ~/.claude/keybindings.json.
Each block names a context and maps key strokes to actions. A context is where the block applies.
This page lists the contexts, the default key of each action, and the actions that have no default key.
Run /keybindings to open the file.
Source: Customize Keyboard Shortcuts and the program. The tables below come from the default keys in the program. An action marked
Example
This file binds ctrl+k in the chat input to the stash action. It frees ctrl+s there. It runs /compact on ctrl+shift+k.
{
"$schema": "https://xsyetopz.github.io/clawdipedia/schemas/claude-code-keybindings.json",
"bindings": [
{
"context": "Chat",
"bindings": {
"ctrl+k": "chat:stash",
"ctrl+s": null,
"ctrl+shift+k": "command:compact"
}
}
]
}
A binding value is an action name, command:<name>, or null. command:<name> runs the slash command as if you typed it. null removes a default key.
The command: name may use letters, digits, :, -, and _.
The schema is claude-code-keybindings.json.
Contexts
A context says where a block of bindings applies. Global bindings work everywhere.
| Context | Status | When it applies |
|---|---|---|
Global | Documented: An official docs page names this item. | The context is active everywhere, regardless of focus. |
Chat | Documented: An official docs page names this item. | When the chat input has focus. |
Autocomplete | Documented: An official docs page names this item. | When the autocomplete menu is visible. |
Confirmation | Documented: An official docs page names this item. | When a confirmation or permission dialog shows. |
Help | Documented: An official docs page names this item. | When the help overlay is open. |
Proactivity | Undocumented: Only the program shows this item. It can change without notice. | When the proactivity dialog is open. |
Transcript | Documented: An official docs page names this item. | When you view the transcript. |
History | Documented: An official docs page names this item. | When you search command history (ctrl+r). |
Task | Documented: An official docs page names this item. | When a task or agent runs in the foreground. |
Theme | Documented: An official docs page names this item. | When the theme picker is open. |
Settings | Documented: An official docs page names this item. | When the settings menu is open. |
Tabs | Documented: An official docs page names this item. | When tab navigation is active. |
Attachments | Documented: An official docs page names this item. | When you navigate image attachments in a select dialog. |
Footer | Documented: An official docs page names this item. | When footer indicators have focus. |
Above | Documented: An official docs page names this item. | When a plugin's panel above the prompt, or a button in it, has keyboard focus. |
Above | Documented: An official docs page names this item. | When a plugin's input field above the prompt has keyboard focus. |
Above | Documented: An official docs page names this item. | When a plugin's select above the prompt has keyboard focus. |
Pane | Documented: An official docs page names this item. | When a plugin's pane has keyboard focus. |
Pane | Documented: An official docs page names this item. | When an input field or select in a plugin's pane has keyboard focus. |
Message | Documented: An official docs page names this item. | When the message selector (rewind) is open. |
Diff | Documented: An official docs page names this item. | When the diff dialog is open. |
Diff | Documented: An official docs page names this item. | When the diff sidebar panel is open. |
Feedback | Undocumented: Only the program shows this item. It can change without notice. | When you type over the session feedback survey. |
Model | Documented: An official docs page names this item. | When the model picker is open. |
Effort | Documented: An official docs page names this item. | When the effort slider is open. |
Select | Documented: An official docs page names this item. | When a select or list component has focus. |
Plugin | Documented: An official docs page names this item. | When the plugin dialog is open. |
Scroll | Documented: An official docs page names this item. | When a scrollable view has focus (fullscreen layout). |
Agents | Documented: An official docs page names this item. | When the agents view (claude agents) is open. |
Pages in This Section
| Page | What it holds |
|---|---|
| Default Keys for the Main Contexts | The default keys of Global, Chat, Autocomplete, Confirmation, Help, Transcript, History, Task, Theme, Settings, Tabs, Attachments, and Footer. |
| Default Keys for Plugin Panels, Dialogs, and Views | The default keys of the plugin panels, the diff views, the pickers, Select, Plugin, Scroll, and Agents. |
| Unbound Actions and Reserved Keys | Actions with no default key, keys you cannot rebind, click to send, and the vim operators. |
Related Pages
- Interface Settings lists the keys that change how the terminal looks and feels.
- Slash Commands covers
/keybindings. - Files on Disk lists
keybindings.json.