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:
| Keys | Where it works |
|---|---|
| \ then Enter | Every terminal |
| Ctrl+J | Any terminal, no setup |
| Shift+Enter | Natively in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal |
| Option+Enter | On 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
| Keys | What it does |
|---|---|
| Esc | Stops the current response or tool call so you can redirect it. The work done so far is kept. |
| Esc, Esc | Clears the draft prompt. On an empty prompt, opens the rewind menu. |
| Shift+Tab | Cycles the permission modes: manual approval, auto-accepting edits, and plan mode, plus further modes where available. |
| Ctrl+C | Interrupts a running operation. With nothing running, the first press clears the prompt and the second exits. |
History and input
| Keys | What it does |
|---|---|
| Up and Down arrows | Move through earlier prompts |
| Ctrl+R | Searches back through prompt history |
| / at the start | A command or skill |
| ! at the start | Shell mode, to run a command directly |
| @ | Mentions a file path |
Slash commands worth knowing
/helpshows help and the available commands./initcreates aCLAUDE.mdguide for the project./clearstarts a new conversation with empty context./compactfrees up context by summarising the conversation so far./modelswitches the model and saves it as your default./resumeresumes a conversation by ID or name, or opens the session picker./usageshows session cost, plan usage limits and activity (/costand/statsdo 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.