Claude Code keyboard shortcuts

Claude Code spends most of its time waiting for a decision, running a tool, or holding a prompt. These keys cover those moments, including interrupts, rewinds, mode changes, multiline input, and terminal-style editing.

Start with Session control before memorizing prompt editing. Those keys decide whether Claude keeps working, stops safely, or gives you the terminal back.

Session control

Esc is the normal way to stop Claude mid-turn and keep finished work. Ctrl+C cancels input or generation, and exits only after two presses.

ActionWindowsmacOSLinux
Interrupt Claude mid-turnKeeps the work done so far.EscEscEsc
Clear input draft, or open the rewind menu when input is emptyEscEscEscEscEscEsc
Cancel current input or generationFirst press clears the prompt when nothing is running; second press exits.CtrlCCtrlCCtrlC
Exit the sessionCtrlDCtrlDCtrlD
Redraw the terminal screen, keeping historyCtrlLCtrlLCtrlL
Move a running Bash command to the backgroundCtrlBCtrlBCtrlB
Stop all running background agentsPress the sequence twice within three seconds to confirm.CtrlXCtrlKCtrlXCtrlKCtrlXCtrlK
Toggle Claude's task checklistCtrlTCtrlTCtrlT
Stash or restore the current promptCtrlSCtrlSCtrlS
Suspend Claude Code to the shellUnix only. Run fg to resume.CtrlZCtrlZCtrlZ
Cycle through permission dialog tabsUse either arrow key to move between tabs.LeftRightLeftRightLeftRight
Switch models without clearing the promptAltPOptionPAltP
Toggle fast modeAltOOptionOAltO

Modes and thinking

Change permission and thinking modes while the session stays open.

ActionWindowsmacOSLinux
Cycle permission modesCycles default, acceptEdits, plan, and any enabled modes such as auto or bypassPermissions.ShiftTabShiftTabShiftTab
Toggle extended thinkingTabTabTab
Enable vim-style editingRun /vim once; Esc then switches to NORMAL mode and i to INSERT.Not documentedNot documentedNot documented

Input and history

Move through prompts, edit the current line, search history, and open the transcript or external editor.

ActionWindowsmacOSLinux
Navigate command historyDown moves forward. In multiline input the arrows move the cursor first.UpUpUp
Toggle the transcript viewerCtrlOCtrlOCtrlO
Open the current prompt in your external editorCtrlGCtrlGCtrlG
Undo the last input editCtrl+Shift+- does the same.Ctrl_Ctrl_Ctrl_
Move cursor back one wordRequires Option as Meta on macOS.AltBAltBAltB
Move cursor forward one wordRequires Option as Meta on macOS.AltFAltFAltF
Move cursor to the start of the current lineCtrlACtrlACtrlA
Move cursor to the end of the current lineCtrlECtrlECtrlE
Delete from the cursor to the end of the lineCtrlKCtrlKCtrlK
Delete from the cursor to the start of the lineCtrlUCtrlUCtrlU
Delete the next wordRequires Option as Meta on macOS.AltDAltDAltD
Paste the most recently deleted textCtrlYCtrlYCtrlY
Cycle through deleted-text historyPress after Ctrl+Y. Requires Option as Meta on macOS.AltYAltYAltY

Multiline input

Add a line break without sending the message, whether the terminal supports Shift+Enter or not.

ActionWindowsmacOSLinux
New line with backslash then EnterWorks in all terminals.\Enter\Enter\Enter
New line with a line feedCtrlJCtrlJCtrlJ
New line on macOS defaultsNot documentedOptionEnterNot documented
New line after running /terminal-setupNative in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, and Windows Terminal.ShiftEnterShiftEnterShiftEnter

Prompt prefixes

The first character of an empty prompt changes what the line does.

ActionWindowsmacOSLinux
Run a slash command///
Run the line as a shell command in the session!!!
Add the line to CLAUDE.md memory###
Reference a file, agent, or MCP resource@@@

Display and help

Open the in-session help and control how Claude's response is displayed while you work.

ActionWindowsmacOSLinux
Toggle syntax highlighting in the theme pickerCtrlTCtrlTCtrlT
Toggle the shortcut help panel on an empty prompt???
Start or stop voice dictationRequires voice dictation to be enabled.SpaceSpaceSpace
Toggle transcript viewer shortcut helpUse inside the transcript viewer.???
Write the full conversation to terminal scrollbackAvailable in fullscreen transcript rendering.[[[
Open the transcript in your editorAvailable in fullscreen transcript rendering.VVV

Make the useful keys stick

Claude Code is at its best when you can interrupt it without panic and edit the next instruction without breaking the session. Keep the control keys close until that part feels ordinary, then let the longer list grow with your work.

You do not need this whole page in your head. Pick two shortcuts that remove a repeated hand movement, use them until they feel ordinary, and come back for the next pair.

Make a printable sheet for this app