Skip to main content

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

Undocumented: Only the program shows this item. It can change without notice.
is not named on the official page.

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.

~/.claude/keybindings.json
{
"$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.

ContextStatusWhen 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.
ProactivityMenu
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.
HistorySearch
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.
ThemePicker
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.
AbovePrompt
Documented: An official docs page names this item.
When a plugin's panel above the prompt, or a button in it, has keyboard focus.
AbovePromptInput
Documented: An official docs page names this item.
When a plugin's input field above the prompt has keyboard focus.
AbovePromptSelect
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.
PaneField
Documented: An official docs page names this item.
When an input field or select in a plugin's pane has keyboard focus.
MessageSelector
Documented: An official docs page names this item.
When the message selector (rewind) is open.
DiffDialog
Documented: An official docs page names this item.
When the diff dialog is open.
DiffPanel
Documented: An official docs page names this item.
When the diff sidebar panel is open.
FeedbackSurvey
Undocumented: Only the program shows this item. It can change without notice.
When you type over the session feedback survey.
ModelPicker
Documented: An official docs page names this item.
When the model picker is open.
EffortSlider
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​

PageWhat it holds
Default Keys for the Main ContextsThe default keys of Global, Chat, Autocomplete, Confirmation, Help, Transcript, HistorySearch, Task, ThemePicker, Settings, Tabs, Attachments, and Footer.
Default Keys for Plugin Panels, Dialogs, and ViewsThe default keys of the plugin panels, the diff views, the pickers, Select, Plugin, Scroll, and Agents.
Unbound Actions and Reserved KeysActions with no default key, keys you cannot rebind, click to send, and the vim operators.