Blog
4 min read

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:

  • \ then Enter works everywhere.
  • Shift+Enter works natively in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal; for others, see Claude Code's terminal configuration docs.
  • On macOS, Option+Enter works 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+B sends a long-running command (a dev server, a slow build) to the background so Claude can keep working.
  • Ctrl+O toggles a more detailed transcript view, so you can see exactly what tools were called.
  • Ctrl+T shows or hides Claude's task list on larger jobs.

Small but handy

  • Type and press Enter while Claude is working to queue a message; it's sent when the current step finishes.

  • Ctrl+S stashes your half-written prompt and brings it back later.

  • Ctrl+L redraws the screen if the display gets garbled (it doesn't clear the conversation — /clear does that). (/compact vs /clear)

  • Ctrl+R searches your prompt history.

  • Tab autocompletes 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

  1. Esc — stop.
  2. Esc Esc — go back.
  3. Shift+Tab — plan mode.
  4. ! — run a command yourself.
  5. @ — 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