Text of code.claude.com › docs › en › keybindings as Styx crawled it on Nov 20, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Customize keyboard shortcuts - Claude Code Docs

Documentation Index Fetch the complete documentation index at: /docs/llms.txt Use this file to discover all available pages before exploring further. Skip to main content Assistant Responses are generated using AI and may contain mistakes. Claude Code supports customizable keyboard shortcuts. Run /keybindings to create or open your configuration file at ~/.claude/keybindings.json . Configuration file The keybindings configuration file is an object with a bindings array.

Each block specifies a context and a map of keystrokes to actions. Changes to the keybindings file are automatically detected and applied without restarting Claude Code. Field Description $schema Optional JSON Schema URL for editor autocompletion $docs Optional documentation URL bindings Array of binding blocks by context This example binds Ctrl+E to open an external editor in the chat context, and unbinds Ctrl+S : { "$schema" : "https://www.schemastore.org/claude-code-keybindings.json" , "$docs" : "https://code.claude.com/docs/en/keybindings" , "bindings" : [ { "context" : "Chat" , "bindings" : { "ctrl+e" : "chat:externalEditor" , "ctrl+s" : null } } ] } Contexts Each binding block specifies a context where the bindings apply: Context Description Global Applies everywhere in the app Chat Main chat input area Autocomplete Autocomplete menu is open Settings Settings menu Confirmation Permission and confirmation dialogs Tabs Tab navigation components Help Help menu is visible Transcript Transcript viewer HistorySearch History search mode (Ctrl+R) Task A task is running in the foreground ThemePicker Theme picker dialog Attachments Image attachment navigation in select dialogs Footer Footer indicator navigation (tasks, teams, diff, artifacts) MessageSelector Rewind and summarize dialog message selection DiffDialog Diff viewer navigation DiffPanel The diff panel is open ModelPicker Model picker effort level EffortSlider Effort slider opened by /effort Select Generic select/list components Plugin Plugin dialog (browse, discover, manage) AbovePrompt The band above the prompt , or a button in it, has keyboard focus AbovePromptInput An input field in the band above the prompt or in a mod’s pane has keyboard focus AbovePromptSelect A select in the band above the prompt or in a mod’s pane has keyboard focus Pane A pane drawn by a mod has keyboard focus PaneField An input field or select in a mod’s pane has keyboard focus Agents Agent view ( claude agents ) Scroll Conversation scrolling and text selection in fullscreen mode Before v2.1.205, a Doctor context and a doctor:fix action existed for the /doctor diagnostics screen.

Available actions Actions follow a namespace:action format, such as chat:submit to send a message or app:toggleTodos to show the task list. Each context has specific actions available. App actions Actions available in the Global context: Action Default Description app:interrupt Ctrl+C Cancel current operation app:exit Ctrl+D Exit Claude Code. Press twice within 800ms to confirm app:redraw (unbound) Force terminal redraw app:toggleTodos Ctrl+T Toggle visibility of Claude’s to-do checklist.

This is not the /tasks background-task view app:toggleTranscript Ctrl+O Toggle verbose transcript History actions Actions for navigating command history: Action Default Description history:search Ctrl+R Open history search history:previous Up Previous history item history:next Down Next history item Chat actions Actions available in the Chat context: Action Default Description chat:cancel Escape Cancel current input chat:clearInput Ctrl+L Force a full screen redraw, preserving input and conversation chat:clearScreen Cmd+K Same as chat:clearInput .

See Clear the conversation for how Cmd+K behaves on iTerm2 chat:killAgents Ctrl+X Ctrl+K Stop all running background subagents in this session and turn off artifact auto-replies for the rest of it. Press the shortcut twice within 3 seconds to confirm. You can press it while a background subagent’s permission prompt is open chat:cycleMode Shift+Tab* Cycle permission modes chat:modelPicker Meta+P Open model picker chat:fastMode Meta+O Toggle fast mode chat:thinkingToggle Meta+T Toggle extended thinking chat:submit Enter Submit message chat:queueSubmit Ctrl+X Enter Submit the message, marked to wait its turn: while Claude is working, Claude Code queues it and never interrupts the turn.

Unlike chat:submit , it submits the draft even while an autocomplete suggestion is highlighted. Requires v2.1.247 or later chat:sendNow Ctrl+Enter, Ctrl+X Ctrl+S Send your queued messages , and your draft with them, right away. When Claude Code sends what you queued covers what happens to the turn Claude is working on. When nothing is running, the key submits the draft, and in shell mode it only queues the command. Terminals that don’t report extended keys deliver Ctrl+Enter as plain Enter , so Ctrl+X Ctrl+S is the binding that works in any terminal.

Requires v2.1.275 or later chat:newline Ctrl+J Insert a newline without submitting chat:undo Ctrl+_, Ctrl+Shift+- Undo last action chat:externalEditor Ctrl+G, Ctrl+X Ctrl+E Open in external editor. The agent view dispatch input follows this action’s single-keystroke bindings too chat:stash Ctrl+S Stash current prompt chat:imagePaste Ctrl+V (Alt+V on Windows and WSL) Paste image from clipboard. On WSL, both shortcuts are bound by default command:<name> (unbound) Run the command /<name> .

For example, "meta+g": "command:compact" in a Chat block makes Meta+G run /compact *On Windows without VT mode (Node <24.2.0/<22.17.0, Bun <1.2.23), defaults to Meta+M. Autocomplete actions Actions available in the Autocomplete context: Action Default Description autocomplete:accept Tab Accept suggestion autocomplete:dismiss Escape Dismiss menu autocomplete:previous Up Previous suggestion autocomplete:next Down Next suggestion Confirmation actions Actions available in the Confirmation context: Action Default Description confirm:yes Enter Confirm action confirm:no Escape Decline action confirm:previous Up Previous option confirm:next Down Next option confirm:nextField Tab In the /fast dialog, turn fast mode on or off confirm:previousField (unbound) Claude Code doesn’t respond to this action, and a keybindings.json that names it remains valid confirm:toggle Space Toggle selection confirm:cycleMode Shift+Tab* On a file permission prompt, closes an open comment field ; with no field open, selects the option that allows the action for the rest of the session, when the prompt offers that option *On Windows without VT mode (Node <24.2.0/<22.17.0, Bun <1.2.23), defaults to Meta+M.

Before v2.1.257, a confirm:toggleExplanation action, bound to Ctrl+E by default, showed a model-generated explanation of the command on Bash and PowerShell permission prompts. Dialogs use confirm:yes and confirm:no to accept and cancel even when they don’t ask a yes-or-no question. If you bind a bare letter such as y or n in this context, the letter also acts on dialogs that never show it as a key. A dialog that shows y and n as its keys reads those letters itself and needs no binding.

In most dialogs, pressing Ctrl+C or Ctrl+D twice closes the dialog instead of exiting Claude Code. The hint after the first press says whether the second press closes the dialog or exits. Both keys are reserved and can’t be rebound. This example binds y to confirm:yes and n to confirm:no : { "bindings" : [ { "context" : "Confirmation" , "bindings" : { "y" : "confirm:yes" , "n" : "confirm:no" } } ] } With these bindings, y and n still type as letters while a text field has focus.

Before v2.1.280, y was also bound to confirm:yes and n to confirm:no by default. If you created your keybindings.json with /keybindings before v2.1.280, the file lists both bindings and they stay in effect until you delete those two lines. Permission actions Actions available in the Confirmation context for permission dialogs: Action Default Description permission:toggleDebug (unbound) Claude Cod

The rest of this page is on the live site.