Customize Claude Code keyboard shortcuts

You can change most of Claude Code's shortcuts with one small JSON file. Run /keybindings to create or open it at ~/.claude/keybindings.json. Changes are picked up automatically, with no restart. For the shortcuts that exist by default, see the shortcuts guide.

The file

It is an object with a bindings array. Each block names a context (where the shortcut applies) and maps keystrokes to actions. This example binds Ctrl+E to open an external editor in the chat input 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
      }
    }
  ]
}

$schema and $docs are optional; the schema gives your editor autocompletion.

Contexts

A context is the part of the app where a binding is active. A few common ones: Global (everywhere), Chat (the main input), Autocomplete (the menu is open), Confirmation (permission dialogs), Transcript, HistorySearch (Ctrl+R), Task (a task is running in the foreground), Select (generic lists) and Scroll (fullscreen scrolling and selection). The docs list more, and a long table of action names such as chat:newline and chat:submit. Actions have the form context:action.

Writing a key

Chords

A chord is a sequence separated by a space, such as ctrl+k ctrl+s: press the first, release, then the second, each within 3 seconds of the previous one or Claude Code cancels the chord.

Remove a default shortcut

Set the key to null, as ctrl+s is in the example above. This also works for chords. If you unbind some but not all chords that share a first key, pressing that key still waits for the rest.

What you can't change

These are fixed: Ctrl+C (interrupt), Ctrl+D (exit), Ctrl+M (always received as Enter), Ctrl+[ (as Escape), Ctrl+I (as Tab), Ctrl+H and Caps Lock. Some shortcuts also clash with other tools: Ctrl+B is the tmux prefix, Ctrl+A is the GNU screen prefix and Ctrl+Z suspends the process. What your terminal sends in the first place is a separate matter; see setting up your terminal.

Vim mode

If you turn on vim mode, vim handles cursor movement and modes, and keybindings handle actions such as submitting a message. Vim keys are not remappable here; to turn a two-key sequence like jj into Escape, the docs point to the vimInsertModeRemaps setting.

Check your mistakes

Claude Code writes a warning to the debug log for parse errors, misspelled modifiers, invalid contexts or actions, reserved shortcuts and duplicate bindings. Start with claude --debug to see them. Two traps from the docs: a misspelled modifier such as ctl+k is dropped and the binding applies to k alone, and a space next to the plus sign, as in ctrl+ k, is read as a chord that never fires. An unknown action name skips your binding and keeps the default for that key. If a change seems to do nothing, see debugging your configuration.

All the guides are in the guides index. This follows Anthropic's keybindings documentation as we read it in October 2026. We are not affiliated with Anthropic. We wrote this from the documentation and have not tested every case. Contexts, actions and defaults change between versions (some chords need a recent version), and where this page and the documentation disagree, the documentation wins.

See also: Claude Code voice dictation.

The free loop-stop skill gives long tasks a limit and a stop rule. If you want a second pair of eyes on your CLAUDE.md and settings, the Tune-Up Kit is a checklist for exactly that.