Skip to content

Claude Code keyboard shortcuts and how to rebind them

The Claude Code shortcuts worth knowing, where keybindings.json lives, how to rebind a key, and how to avoid shadowing a shortcut you use without thinking.

Short answer: learn shift+tab (permission modes), escape, ctrl+r (prompt history) and ctrl+g (write the prompt in your editor) first. To rebind a key, add it to ~/.claude/keybindings.json, and check what that key already does before you take it.

Claude Code is a terminal app, and most of its speed is in the keyboard. A handful of shortcuts cover nearly everything, and you can rebind them. The catch is that a new binding can quietly take a key away from something else.

Which shortcuts are worth learning first?

KeysWhat it does
shift+tabCycle permission modes
escapeCancel the current input
ctrl+cCancel what is running
ctrl+dExit (twice to confirm)
ctrl+rSearch your prompt history
ctrl+oShow or hide the verbose transcript
ctrl+tShow or hide Claude's checklist
ctrl+jNew line without sending
ctrl+gOpen your editor to write the prompt
ctrl+sStash the prompt you are writing
ctrl+vPaste an image (alt+v on Windows and WSL)
ctrl+bSend a running task to the background
alt+pOpen the model picker
alt+tToggle extended thinking

On a Mac, alt is the Option key, and your terminal may need "Use Option as Meta" turned on for it to work.

Where do keybindings live?

Your own bindings go in ~/.claude/keybindings.json. It is a personal file: keys are about your hands and your terminal, so there is no project version to commit.

Bindings are grouped by the screen they apply to: each block names a context and maps keys to actions. This one opens your editor with ctrl+e while you type, and null frees ctrl+s:

{
  "bindings": [
    {
      "context": "Chat",
      "bindings": {
        "ctrl+e": "chat:externalEditor",
        "ctrl+s": null
      }
    }
  ]
}

Global is the context for keys that should work everywhere.

Actions are named the way the interface names them, like app:interrupt or history:search. There are over a hundred of them across about twenty screens (Chat, Transcript, HistorySearch, Confirmation and more).

How do you write a key?

  • Modifiers come first, joined with +: ctrl+shift+k
  • A chord is two strokes with a space: ctrl+x ctrl+e
  • A capital letter on its own means Shift: K is shift+k. After a modifier it does not: ctrl+K is just ctrl+k

Which keys can you not rebind?

Some strokes never reach Claude Code as themselves:

  • ctrl+c and ctrl+d are hardcoded to interrupt and exit
  • ctrl+m arrives as Enter, because a terminal sends the same bytes for both. Binding it writes a line that can never fire

Your terminal or multiplexer may also swallow keys first. tmux's prefix key, for example, never reaches the app inside it.

What did my binding shadow?

This is the real question with any rebinding. The same key often does different things on different screens: ctrl+s stashes your prompt in Chat but switches views on the Agents screen. Bind it globally and you lose both.

Two habits avoid surprises:

  1. Scope the binding to the screen you mean with when. A binding for one screen shadows far less than a global one
  2. Look the key up before you take it. If it is already in use, pick another

Where can you check this?

How do you check a binding before you write it?

Config Studio for Claude Code has a Keybindings surface that knows every default binding on every screen. Type an action and a key, and it tells you what that key already does and where, before the file exists, then writes the entry for ~/.claude/keybindings.json.

The tool

Do it in your browser.

Claude Code

Config Studio for Claude Code

Every file Claude Code reads, explained: what each setting does, where it lives, which file wins, and an editor that writes it for you.

Keep reading

More from the blog.

Every post

Contact