← Back to site
Claude Code Guides

Claude Code keyboard shortcuts in the terminal

A handful of keys cover most of what you do in a Claude Code session in the terminal: writing a prompt over several lines, stopping a task, switching modes and getting back to an earlier session. These come from Anthropic's interactive mode docs and command reference, checked on 4 November 2026.

New lines and Shift+Enter

Enter sends the prompt. To start a new line instead:

KeysWhere it works
\ then EnterEvery terminal
Ctrl+JAny terminal, no setup
Shift+EnterNatively in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal
Option+EnterOn a Mac, once Option is set to act as Meta in the terminal

In VS Code, Cursor, Alacritty or Zed, run /terminal-setup once and it installs a Shift+Enter keybinding for new lines.

Stopping and steering

KeysWhat it does
EscStops the current response or tool call so you can redirect it. The work done so far is kept.
Esc, EscClears the draft prompt. On an empty prompt, opens the rewind menu.
Shift+TabCycles the permission modes: manual approval, auto-accepting edits, and plan mode, plus further modes where available.
Ctrl+CInterrupts a running operation. With nothing running, the first press clears the prompt and the second exits.

History and input

KeysWhat it does
Up and Down arrowsMove through earlier prompts
Ctrl+RSearches back through prompt history
/ at the startA command or skill
! at the startShell mode, to run a command directly
@Mentions a file path

Slash commands worth knowing

  • /help shows help and the available commands.
  • /init creates a CLAUDE.md guide for the project.
  • /clear starts a new conversation with empty context.
  • /compact frees up context by summarising the conversation so far.
  • /model switches the model and saves it as your default.
  • /resume resumes a conversation by ID or name, or opens the session picker.
  • /usage shows session cost, plan usage limits and activity (/cost and /stats do the same).

Picking up where you left off

From the shell, claude -c continues the most recent conversation in the current folder, and claude -r followed by a session ID or name resumes a specific one.

My own sessions live inside tmux on a Mac Mini that stays on, so they survive any disconnection and I can reattach from my phone through ShellDrop. The setup is in running Claude Code from an iPhone.

Learning it on your own machine.

The half-day Claude Code course starts from opening Terminal for the first time, with your screen shared the whole way. Two seats, live on Zoom.

See the Claude Code course →

Questions about Claude Code shortcuts

How do I add a new line in Claude Code?

Type a backslash and press Enter, which works in every terminal, or press Ctrl+J. Shift+Enter works natively in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal, and the /terminal-setup command adds it to VS Code, Cursor, Alacritty and Zed.

Why doesn't Shift+Enter work in Claude Code?

Some terminals don't send Shift+Enter as its own key. Run /terminal-setup to install the keybinding where it's supported, or use a backslash then Enter, or Ctrl+J, which work everywhere.

How do I stop Claude Code mid-task?

Press Esc. It stops the current response or tool call and keeps the work done so far, so you can redirect it. Ctrl+C interrupts too, and pressed twice with nothing running it exits.

How do I switch to plan mode in Claude Code?

Press Shift+Tab to cycle through the permission modes: the default manual mode, auto-accepting edits, and plan mode, plus further modes where they're available.