Claude Code Keyboard Shortcuts: The Ones Worth Memorising
The Claude Code shortcuts that save the most time: Shift+Tab for modes, Esc to interrupt, Esc Esc to rewind, ! for shell commands, @ for files, multi-line input, pasting images, and how to customise keybindings. A cheat sheet for day one.
Claude Code lives in the terminal, so the keyboard is the interface. A dozen shortcuts cover nearly everything; learn these and you'll stop reaching for the mouse. Behaviour below reflects Claude Code as of autumn 2026 — type ? in an empty prompt to see the shortcuts your version supports.
The essentials
| Shortcut | Does |
|---|---|
Enter |
Send your message |
Esc |
Interrupt Claude mid-task (it stops and waits for you) |
Esc Esc |
With text typed: clear the draft. With an empty prompt: open the rewind menu |
Shift+Tab |
Cycle permission modes — normal, accept edits, plan… |
Ctrl+C |
Interrupt, or clear the input; press again on an empty prompt to exit |
Ctrl+D |
Exit the session |
↑ / ↓ |
Scroll through your previous prompts |
? |
Show available shortcuts |
Esc is your best friend
If Claude heads in the wrong direction — editing the wrong file, over-engineering, running a long command you didn't want — press Esc straight away. It stops cleanly, keeps what's done so far, and lets you redirect: "Stop — don't touch the tests, just fix the type error."
Pressing Esc twice on an empty prompt opens the rewind menu (with text typed, it clears the draft instead — ↑ brings it back), where you can jump back to an earlier point in the conversation and, if you like, restore the code to how it was then. (Claude Code checkpoints)
Shift+Tab for modes
Each press moves to the next permission mode; the status line shows which one you're in. The most useful stop is plan mode, where Claude researches and proposes a plan without changing anything. (Permission modes explained, plan mode)
Input prefixes
Start your message with one of these characters:
| Prefix | Does |
|---|---|
/ |
Run a slash command — /clear, /compact, /model, /init… (Slash commands) |
@ |
Mention a file or folder; autocompletes paths and adds it to context |
! |
Bash mode: run a shell command directly, e.g. ! npm test, and the output goes into the conversation |
! is underrated. Instead of asking Claude to run the tests (and waiting for it to decide how), run them yourself in one keystroke, and Claude sees the result.
Writing multi-line prompts
Enter sends. To add a new line instead:
\thenEnterworks everywhere.Shift+Enterworks natively in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal; for others, see Claude Code's terminal configuration docs.- On macOS,
Option+Enterworks once your terminal treats Option as Meta.
For long prompts, Ctrl+G opens your text editor; write there, save, close, and the text lands in the prompt. The same shortcut opens a proposed plan in your editor in plan mode.
Images
Paste a screenshot with Ctrl+V — on a Mac too, since Cmd+V pastes only text in most terminals (iTerm2 is an exception). On Windows and WSL, use Alt+V if Ctrl+V doesn't work. (Pasting images and screenshots)
While Claude is working
Ctrl+Bsends a long-running command (a dev server, a slow build) to the background so Claude can keep working.Ctrl+Otoggles a more detailed transcript view, so you can see exactly what tools were called.Ctrl+Tshows or hides Claude's task list on larger jobs.
Small but handy
Type and press
Enterwhile Claude is working to queue a message; it's sent when the current step finishes.Ctrl+Sstashes your half-written prompt and brings it back later.Ctrl+Lredraws the screen if the display gets garbled (it doesn't clear the conversation —/cleardoes that). (/compact vs /clear)Ctrl+Rsearches your prompt history.Tabautocompletes file paths and commands.
In VS Code
If you use the extension, Ctrl+Esc (Cmd+Esc on Mac) toggles focus between your code and the Claude panel. (Claude Code in VS Code)
Customising
You can rebind keys in ~/.claude/keybindings.json — for example, if your terminal or tmux already uses a shortcut. (tmux for long-running sessions is a common source of conflicts.)
The five to learn today
Esc— stop.Esc Esc— go back.Shift+Tab— plan mode.!— run a command yourself.@— point at a file.
EasySpawn gives you a persistent server with Claude Code ready in a browser terminal — same shortcuts, from any device, with sessions that keep running when you close the tab. See how it works or join the waitlist.
Related: Claude Code Slash Commands · Claude Code Tutorial for Beginners · Claude Code Permission Modes · Claude Code Checkpoints
Keep reading
How to Give Claude Code Images and Screenshots
Claude Code can read screenshots, mockups and error images. How to paste or drag an image into the terminal, reference an image file by path, the Ctrl+V vs Cmd+V gotcha on Mac, and the prompts that get the best results from visual input.
Claude Code on Windows: Native or WSL?
Claude Code runs natively on Windows and inside WSL. How to install each, why Git for Windows matters for the native version, when WSL is the better choice, the file-path and performance gotchas, and how to use it with VS Code on Windows.