Claude Tips mascot
Claude Tips & Tricks
Claude Code beginner

Customize Keybindings for Claude Code

Rebind keyboard shortcuts, add chord bindings, and configure modifier keys by editing ~/.claude/keybindings.json.

Claude Code’s default keybindings might not match your muscle memory. Customize them.

Edit Keybindings

Open the keybindings file:

nano ~/.claude/keybindings.json

Common Customizations

{
  "bindings": {
    "ctrl+s": "submit",
    "ctrl+k": "clear",
    "ctrl+r": "resume",
    "ctrl+p": "plan"
  }
}

Chord Bindings

Chain two key presses for less common actions:

{
  "bindings": {
    "ctrl+k ctrl+c": "compact",
    "ctrl+k ctrl+r": "rewind",
    "ctrl+k ctrl+m": "model"
  }
}

Press Ctrl+K, release, then press Ctrl+C to compact.

Available Actions

ActionWhat it does
submitSend the current input
clearClear conversation
compactCompact context
rewindUndo last turn
resumeResume last session
planEnter plan mode
modelSwitch model

Tip

If you use Vim mode, keybindings apply in insert mode. Normal mode uses standard Vim keys.