{"slug": "customize-keyboard-shortcuts-in-claude-code", "title": "Customize keyboard shortcuts in Claude Code", "summary": "Claude Code now supports customizable keyboard shortcuts in version 2.1.18 and later. Users can create or modify their keybinding configuration by running `/keybindings` to open the `~/.claude/keybindings.json` file, with changes automatically detected and applied without restarting the application. The feature allows users to bind keystrokes to specific actions across multiple contexts including chat, autocomplete, and global commands.", "body_md": "Customizable keyboard shortcuts require Claude Code v2.1.18 or later. Check your version with `claude --version`\n\n.\n\nClaude Code supports customizable keyboard shortcuts. Run `/keybindings`\n\nto create or open your configuration file at `~/.claude/keybindings.json`\n\n.\n## Configuration file\n\nThe keybindings configuration file is an object with a `bindings`\n\narray. Each block specifies a context and a map of keystrokes to actions.\nChanges to the keybindings file are automatically detected and applied without restarting Claude Code.\n\n| Field | Description |\n|---|\n`$schema` | Optional JSON Schema URL for editor autocompletion |\n`$docs` | Optional documentation URL |\n`bindings` | Array of binding blocks by context |\n\nThis example binds `Ctrl+E`\n\nto open an external editor in the chat context, and unbinds `Ctrl+U`\n\n:\n## Contexts\n\nEach binding block specifies a **context** where the bindings apply:\n| Context | Description |\n|---|\n`Global` | Applies everywhere in the app |\n`Chat` | Main chat input area |\n`Autocomplete` | Autocomplete menu is open |\n`Settings` | Settings menu |\n`Confirmation` | Permission and confirmation dialogs |\n`Tabs` | Tab navigation components |\n`Help` | Help menu is visible |\n`Transcript` | Transcript viewer |\n`HistorySearch` | History search mode (Ctrl+R) |\n`Task` | Background task is running |\n`ThemePicker` | Theme picker dialog |\n`Attachments` | Image attachment navigation in select dialogs |\n`Footer` | Footer indicator navigation (tasks, teams, diff) |\n`MessageSelector` | Rewind and summarize dialog message selection |\n`DiffDialog` | Diff viewer navigation |\n`ModelPicker` | Model picker effort level |\n`Select` | Generic select/list components |\n`Plugin` | Plugin dialog (browse, discover, manage) |\n`Scroll` | Conversation scrolling and text selection in fullscreen mode |\n`Doctor` | `/doctor` diagnostics screen |\n\n## Available actions\n\nActions follow a `namespace:action`\n\nformat, such as `chat:submit`\n\nto send a message or `app:toggleTodos`\n\nto show the task list. Each context has specific actions available.\n### App actions\n\nActions available in the `Global`\n\ncontext:\n| Action | Default | Description |\n|---|\n`app:interrupt` | Ctrl+C | Cancel current operation |\n`app:exit` | Ctrl+D | Exit Claude Code |\n`app:redraw` | (unbound) | Force terminal redraw |\n`app:toggleTodos` | Ctrl+T | Toggle task list visibility |\n`app:toggleTranscript` | Ctrl+O | Toggle verbose transcript |\n\n### History actions\n\nActions for navigating command history:\n| Action | Default | Description |\n|---|\n`history:search` | Ctrl+R | Open history search |\n`history:previous` | Up | Previous history item |\n`history:next` | Down | Next history item |\n\n### Chat actions\n\nActions available in the `Chat`\n\ncontext:\n| Action | Default | Description |\n|---|\n`chat:cancel` | Escape | Cancel current input |\n`chat:clearInput` | Ctrl+L | Force a full screen redraw, preserving input. In [fullscreen rendering](/docs/en/fullscreen#clear-the-conversation), press twice within two seconds to run `/clear` |\n`chat:clearScreen` | Cmd+K | In [fullscreen rendering](/docs/en/fullscreen#clear-the-conversation), press twice within two seconds to run `/clear` |\n`chat:killAgents` | Ctrl+X Ctrl+K | Kill all running [background subagents](/docs/en/sub-agents#run-subagents-in-foreground-or-background) in this session |\n`chat:cycleMode` | Shift+Tab* | Cycle permission modes |\n`chat:modelPicker` | Meta+P | Open model picker |\n`chat:fastMode` | Meta+O | Toggle fast mode |\n`chat:thinkingToggle` | Meta+T | Toggle extended thinking |\n`chat:submit` | Enter | Submit message |\n`chat:newline` | Ctrl+J | Insert a newline without submitting |\n`chat:undo` | Ctrl+_, Ctrl+Shift+- | Undo last action |\n`chat:externalEditor` | Ctrl+G, Ctrl+X Ctrl+E | Open in external editor |\n`chat:stash` | Ctrl+S | Stash current prompt |\n`chat:imagePaste` | Ctrl+V (Alt+V on Windows and WSL) | Paste image from clipboard. On WSL, both shortcuts are bound by default |\n\n*On Windows without VT mode (Node <24.2.0/<22.17.0, Bun <1.2.23), defaults to Meta+M.\n### Autocomplete actions\n\nActions available in the `Autocomplete`\n\ncontext:\n| Action | Default | Description |\n|---|\n`autocomplete:accept` | Tab | Accept suggestion |\n`autocomplete:dismiss` | Escape | Dismiss menu |\n`autocomplete:previous` | Up | Previous suggestion |\n`autocomplete:next` | Down | Next suggestion |\n\n### Confirmation actions\n\nActions available in the `Confirmation`\n\ncontext:\n| Action | Default | Description |\n|---|\n`confirm:yes` | Y, Enter | Confirm action |\n`confirm:no` | N, Escape | Decline action |\n`confirm:previous` | Up | Previous option |\n`confirm:next` | Down | Next option |\n`confirm:nextField` | Tab | Next field |\n`confirm:previousField` | (unbound) | Previous field |\n`confirm:toggle` | Space | Toggle selection |\n`confirm:cycleMode` | Shift+Tab | Cycle permission modes |\n`confirm:toggleExplanation` | Ctrl+E | Toggle permission explanation |\n\n### Permission actions\n\nActions available in the `Confirmation`\n\ncontext for permission dialogs:\n| Action | Default | Description |\n|---|\n`permission:toggleDebug` | (unbound) | Toggle permission debug info. The previous default of Ctrl+D was removed in v2.1.146 because it shadowed `app:exit` |\n\n### Transcript actions\n\nActions available in the `Transcript`\n\ncontext:\n| Action | Default | Description |\n|---|\n`transcript:toggleShowAll` | Ctrl+E | Toggle show all content |\n`transcript:exit` | q, Ctrl+C, Escape | Exit transcript view |\n\n### History search actions\n\nActions available in the `HistorySearch`\n\ncontext:\n| Action | Default | Description |\n|---|\n`historySearch:next` | Ctrl+R | Next match |\n`historySearch:accept` | Escape, Tab | Accept selection |\n`historySearch:cancel` | Ctrl+C | Cancel search |\n`historySearch:execute` | Enter | Execute selected command |\n`historySearch:cycleScope` | Ctrl+S | Cycle scope: session, project, everywhere |\n\n### Task actions\n\nActions available in the `Task`\n\ncontext:\n| Action | Default | Description |\n|---|\n`task:background` | Ctrl+B | Background current task |\n\n### Theme actions\n\nActions available in the `ThemePicker`\n\ncontext:\n| Action | Default | Description |\n|---|\n`theme:toggleSyntaxHighlighting` | Ctrl+T | Toggle syntax highlighting |\n\n### Help actions\n\nActions available in the `Help`\n\ncontext:\n| Action | Default | Description |\n|---|\n`help:dismiss` | Escape | Close help menu |\n\n### Tabs actions\n\nActions available in the `Tabs`\n\ncontext:\n| Action | Default | Description |\n|---|\n`tabs:next` | Tab, Right | Next tab |\n`tabs:previous` | Shift+Tab, Left | Previous tab |\n\n### Attachments actions\n\nActions available in the `Attachments`\n\ncontext:\n| Action | Default | Description |\n|---|\n`attachments:next` | Right | Next attachment |\n`attachments:previous` | Left | Previous attachment |\n`attachments:remove` | Backspace, Delete | Remove selected attachment |\n`attachments:exit` | Down, Escape | Exit attachment navigation |\n\nActions available in the `Footer`\n\ncontext:\n| Action | Default | Description |\n|---|\n`footer:next` | Right | Next footer item |\n`footer:previous` | Left | Previous footer item |\n`footer:up` | Up | Navigate up in footer (deselects at top) |\n`footer:down` | Down | Navigate down in footer |\n`footer:openSelected` | Enter | Open selected footer item |\n`footer:clearSelection` | Escape | Clear footer selection |\n\n### Message selector actions\n\nActions available in the `MessageSelector`\n\ncontext:\n| Action | Default | Description |\n|---|\n`messageSelector:up` | Up, K, Ctrl+P | Move up in list |\n`messageSelector:down` | Down, J, Ctrl+N | Move down in list |\n`messageSelector:top` | Ctrl+Up, Shift+Up, Meta+Up, Shift+K | Jump to top |\n`messageSelector:bottom` | Ctrl+Down, Shift+Down, Meta+Down, Shift+J | Jump to bottom |\n`messageSelector:select` | Enter | Select message |\n\n### Diff actions\n\nActions available in the `DiffDialog`\n\ncontext:\n| Action | Default | Description |\n|---|\n`diff:dismiss` | Escape | Close diff viewer |\n`diff:previousSource` | Left | Previous diff source |\n`diff:nextSource` | Right | Next diff source |\n`diff:previousFile` | Up, K | Previous file in the file list; scroll up one line in the detail view |\n`diff:nextFile` | Down, J | Next file in the file list; scroll down one line in the detail view |\n`diff:viewDetails` | Enter | View diff details |\n`diff:back` | (context-specific) | Go back in diff viewer |\n\nThe diff detail view also binds pager-style keys to the standard [scroll actions](#scroll-actions). These bindings are part of the `DiffDialog`\n\ncontext and apply only in the detail view; the `Scroll`\n\ncontext defaults listed under [Scroll actions](#scroll-actions) are unchanged.\n| Action | Default | Description |\n|---|\n`scroll:pageUp` | PageUp | Scroll up half a viewport |\n`scroll:pageDown` | PageDown | Scroll down half a viewport |\n`scroll:fullPageUp` | Shift+Space, B | Scroll up a full viewport |\n`scroll:fullPageDown` | Space | Scroll down a full viewport |\n`scroll:top` | G, Home | Jump to the top |\n`scroll:bottom` | Shift+G, End | Jump to the bottom |\n\n### Model picker actions\n\nActions available in the `ModelPicker`\n\ncontext:\n| Action | Default | Description |\n|---|\n`modelPicker:decreaseEffort` | Left | Decrease effort level |\n`modelPicker:increaseEffort` | Right | Increase effort level |\n`modelPicker:thisSessionOnly` | s | Apply highlighted model to this session only |\n\n### Select actions\n\nActions available in the `Select`\n\ncontext:\n| Action | Default | Description |\n|---|\n`select:next` | Down, J, Ctrl+N | Next option |\n`select:previous` | Up, K, Ctrl+P | Previous option |\n`select:accept` | Enter | Accept selection |\n`select:cancel` | Escape | Cancel selection |\n\n### Plugin actions\n\nActions available in the `Plugin`\n\ncontext:\n| Action | Default | Description |\n|---|\n`plugin:toggle` | Space | Toggle plugin selection |\n`plugin:install` | I | Install selected plugins |\n`plugin:favorite` | F | Favorite the selected plugin so it sorts near the top of the Installed tab |\n\n### Settings actions\n\nActions available in the `Settings`\n\ncontext:\n| Action | Default | Description |\n|---|\n`settings:search` | / | Enter search mode |\n`settings:retry` | R | Retry loading usage data (on error) |\n`settings:close` | Enter | Save changes and close the config panel. Escape discards changes and closes |\n\n### Doctor actions\n\nActions available in the `Doctor`\n\ncontext:\n| Action | Default | Description |\n|---|\n`doctor:fix` | F | Send the diagnostics report to Claude to fix the reported issues. Only active when issues are found |\n\n### Voice actions\n\nActions available in the `Chat`\n\ncontext when [voice dictation](/docs/en/voice-dictation) is enabled:\n| Action | Default | Description |\n|---|\n`voice:pushToTalk` | Space | Dictate a prompt. Hold or tap depending on `/voice` mode |\n\nActions available in the `Scroll`\n\ncontext when [fullscreen rendering](/docs/en/fullscreen) is enabled:\n| Action | Default | Description |\n|---|\n`scroll:lineUp` | (unbound) | Scroll up one line. Mouse wheel scrolling triggers this action |\n`scroll:lineDown` | (unbound) | Scroll down one line. Mouse wheel scrolling triggers this action |\n`scroll:pageUp` | PageUp | Scroll up half the viewport height |\n`scroll:pageDown` | PageDown | Scroll down half the viewport height |\n`scroll:top` | Ctrl+Home | Jump to the start of the conversation |\n`scroll:bottom` | Ctrl+End | Jump to the latest message and re-enable auto-follow |\n`scroll:halfPageUp` | (unbound) | Scroll up half the viewport height. Same behavior as `scroll:pageUp` , provided for vi-style rebinds |\n`scroll:halfPageDown` | (unbound) | Scroll down half the viewport height. Same behavior as `scroll:pageDown` , provided for vi-style rebinds |\n`scroll:fullPageUp` | (unbound) | Scroll up the full viewport height |\n`scroll:fullPageDown` | (unbound) | Scroll down the full viewport height |\n`selection:copy` | Ctrl+Shift+C / Cmd+C | Copy the selected text to the clipboard |\n`selection:clear` | (unbound) | Clear the active text selection |\n`selection:extendLeft` | Shift+Left | Extend the active selection one column left |\n`selection:extendRight` | Shift+Right | Extend the active selection one column right |\n`selection:extendUp` | Shift+Up | Extend the active selection one row up. Scrolls the viewport when the selection reaches the top edge |\n`selection:extendDown` | Shift+Down | Extend the active selection one row down. Scrolls the viewport when the selection reaches the bottom edge |\n`selection:extendLineStart` | Shift+Home | Extend the active selection to the start of the line |\n`selection:extendLineEnd` | Shift+End | Extend the active selection to the end of the line |\n\n## Keystroke syntax\n\n### Modifiers\n\nUse modifier keys with the `+`\n\nseparator:\n`ctrl`\n\nor `control`\n\n- Control key\n`shift`\n\n- Shift key\n`alt`\n\n, `opt`\n\n, `option`\n\n, or `meta`\n\n- Alt key on Windows and Linux, Option key on macOS\n`cmd`\n\n, `command`\n\n, `super`\n\n, or `win`\n\n- Command key on macOS, Windows key on Windows, Super key on Linux\n\nThe `cmd`\n\ngroup is only detected in terminals that report the Super modifier, such as those supporting the Kitty keyboard protocol or xterm’s `modifyOtherKeys`\n\nmode. Most terminals do not send it, so use `ctrl`\n\nor `meta`\n\nfor bindings you want to work everywhere.\nFor example:\n### Uppercase letters\n\nA standalone uppercase letter implies Shift. For example, `K`\n\nis equivalent to `shift+k`\n\n. This is useful for vim-style bindings where uppercase and lowercase keys have different meanings.\nUppercase letters with modifiers (e.g., `ctrl+K`\n\n) are treated as stylistic and do **not** imply Shift: `ctrl+K`\n\nis the same as `ctrl+k`\n\n.\n### Chords\n\nChords are sequences of keystrokes separated by spaces:\n### Special keys\n\n`escape`\n\nor `esc`\n\n- Escape key\n`enter`\n\nor `return`\n\n- Enter key\n`tab`\n\n- Tab key\n`space`\n\n- Space bar\n`up`\n\n, `down`\n\n, `left`\n\n, `right`\n\n- Arrow keys\n`backspace`\n\n, `delete`\n\n- Delete keys\n\n## Unbind default shortcuts\n\nSet an action to `null`\n\nto unbind a default shortcut:\nThis also works for chord bindings. Unbinding every chord that shares a prefix frees that prefix for use as a single-key binding:\nIf you unbind some but not all chords on a prefix, pressing the prefix still enters chord-wait mode for the remaining bindings.\n## Reserved shortcuts\n\nThese shortcuts cannot be rebound:\n| Shortcut | Reason |\n|---|\n| Ctrl+C | Hardcoded interrupt/cancel |\n| Ctrl+D | Hardcoded exit |\n| Ctrl+M | Identical to Enter in terminals (both send CR) |\n| Caps Lock | Not delivered to terminal applications |\n\n## Terminal conflicts\n\nSome shortcuts may conflict with terminal multiplexers:\n| Shortcut | Conflict |\n|---|\n| Ctrl+B | tmux prefix (press twice to send) |\n| Ctrl+A | GNU screen prefix |\n| Ctrl+Z | Unix process suspend (SIGTSTP) |\n\n## Vim mode interaction\n\nWhen vim mode is enabled via `/config`\n\n→ Editor mode, keybindings and vim mode operate independently:\n**Vim mode** handles input at the text input level (cursor movement, modes, motions)\n**Keybindings** handle actions at the component level (toggle todos, submit, etc.)\n- The Escape key in vim mode switches INSERT to NORMAL mode; it does not trigger\n`chat:cancel`\n\n- Most Ctrl+key shortcuts pass through vim mode to the keybinding system\n- In vim NORMAL mode,\n`?`\n\nshows the help menu (vim behavior)\n- In vim NORMAL mode,\n`/`\n\nopens history search, the same as Ctrl+R in standard mode\n\n## Validation\n\nClaude Code validates your keybindings and shows warnings for:\n- Parse errors (invalid JSON or structure)\n- Invalid context names\n- Reserved shortcut conflicts\n- Terminal multiplexer conflicts\n- Duplicate bindings in the same context\n\nRun `/doctor`\n\nto see any keybinding warnings.", "url": "https://wpnews.pro/news/customize-keyboard-shortcuts-in-claude-code", "canonical_source": "https://code.claude.com/docs/en/keybindings", "published_at": "2026-06-05 09:18:39+00:00", "updated_at": "2026-06-05 09:51:19.213501+00:00", "lang": "en", "topics": ["ai-tools", "ai-products"], "entities": ["Claude Code"], "alternates": {"html": "https://wpnews.pro/news/customize-keyboard-shortcuts-in-claude-code", "markdown": "https://wpnews.pro/news/customize-keyboard-shortcuts-in-claude-code.md", "text": "https://wpnews.pro/news/customize-keyboard-shortcuts-in-claude-code.txt", "jsonld": "https://wpnews.pro/news/customize-keyboard-shortcuts-in-claude-code.jsonld"}}