Complete reference for keyboard shortcuts, input modes, and interactive features in Claude Code sessions.
Shortcut | Description | Context |
---|---|---|
Ctrl+C | Cancel current input or generation | Standard interrupt |
Ctrl+D | Exit Claude Code session | EOF signal |
Ctrl+L | Clear terminal screen | Keeps conversation history |
Up/Down arrows | Navigate command history | Recall previous inputs |
Esc + Esc | Edit previous message | Double-escape to modify |
Method | Shortcut | Context |
---|---|---|
Quick escape | \ + Enter | Works in all terminals |
macOS default | Option+Enter | Default on macOS |
Terminal setup | Shift+Enter | After /terminal-setup |
Paste mode | Paste directly | For code blocks, logs |
Shortcut | Description | Notes |
---|---|---|
# at start | Memory shortcut - add to CLAUDE.md | Prompts for file selection |
/ at start | Slash command | See slash commands |
/vim
command or configure permanently via /config
.
Command | Action | From mode |
---|---|---|
Esc | Enter NORMAL mode | INSERT |
i | Insert before cursor | NORMAL |
I | Insert at beginning of line | NORMAL |
a | Insert after cursor | NORMAL |
A | Insert at end of line | NORMAL |
o | Open line below | NORMAL |
O | Open line above | NORMAL |
Command | Action |
---|---|
h /j /k /l | Move left/down/up/right |
w | Next word |
e | End of word |
b | Previous word |
0 | Beginning of line |
$ | End of line |
^ | First non-blank character |
gg | Beginning of input |
G | End of input |
Command | Action |
---|---|
x | Delete character |
dd | Delete line |
D | Delete to end of line |
dw /de /db | Delete word/to end/back |
cc | Change line |
C | Change to end of line |
cw /ce /cb | Change word/to end/back |
. | Repeat last change |
/terminal-setup
to install Shift+Enter binding for iTerm2 and VS Code terminals./clear
command!
) is disabled by default