Claude Code keyboard shortcuts
Claude Code is Anthropic's coding agent that reads your project, edits files, and runs commands from the terminal. These keys interrupt or rewind a turn, switch permission modes and models, edit and recall prompts, add new lines, and open the transcript.
Windows, macOS, Linux · 52 shortcutsSession control
Stop, background, redraw, and leave a session safely while preserving the work already completed.
| Action | Shortcuts |
|---|---|
| Interrupt Claude mid-turnKeeps work completed so far. | Windows / macOS / LinuxEsc |
| Cancel current input or generationThe first press clears a draft or stops work. A second press exits. | Windows / macOS / LinuxCtrl + C |
| Clear a draft, or open the rewind menu when the prompt is empty | Windows / macOS / LinuxEsc then Esc |
| Stop background agents and artifact repliesRepeat the sequence to confirm. | Windows / macOS / LinuxCtrl + X then Ctrl + K |
| Move a running Bash command to the background | Windows / macOS / LinuxCtrl + B |
| Exit the sessionClaude Code asks for confirmation when needed. | Windows / macOS / LinuxCtrl + D |
| Redraw the terminal screen | Windows / macOS / LinuxCtrl + L |
| Toggle the task checklist | Windows / macOS / LinuxCtrl + T |
| Stash or restore the current prompt | Windows / macOS / LinuxCtrl + S |
| Suspend Claude Code to the shellUnix shells resume with fg. Claude Code does not list a Windows default for this action. | WindowsNot documented macOS / LinuxCtrl + Z |
| Move between dialog tabsRight moves the other way. | Windows / macOS / LinuxLeft |
| Accept an autocomplete suggestion or permission comment | Windows / macOS / LinuxTab |
| Close a dialog or interrupt the current interaction | Windows / macOS / LinuxEsc |
Modes and models
Change permissions, model selection, fast mode, and extended thinking without leaving the prompt.
| Action | Shortcuts |
|---|---|
| Cycle permission modesWindows uses Alt+M; macOS and Linux use Shift+Tab. | WindowsAlt + M macOS / LinuxShift + Tab |
| Switch models without clearing the promptThe macOS binding needs Option as Meta in some terminals. | Windows / LinuxAlt + P macOSOption + P |
| Toggle extended thinkingThis is Alt+T, not Tab. macOS may need Option as Meta. | Windows / LinuxAlt + T macOSOption + T |
| Toggle fast modeThe macOS binding may need Option as Meta. | Windows / LinuxAlt + O macOSOption + O |
| Enable Vim-style editingRun /vim. Esc enters NORMAL mode and i enters INSERT mode; this is a command, not a default shortcut. | Windows / macOS / LinuxNot documented |
Prompt input and history
Move through prompt history, edit text with readline-style controls, and open the editor or transcript.
| Action | Shortcuts |
|---|---|
| Move to the previous prompt in historyDown moves forward. In multiline input, arrows move within the draft first. | Windows / macOS / LinuxUp |
| Reverse-search prompt historyEnter accepts the result; Esc keeps it for editing. | Windows / macOS / LinuxCtrl + R |
| Open the current prompt in the external editor | Windows / macOS / LinuxCtrl + G |
| Open the transcript viewer | Windows / macOS / LinuxCtrl + O |
| Move to the start of the line | Windows / macOS / LinuxCtrl + A |
| Move to the end of the line | Windows / macOS / LinuxCtrl + E |
| Move back one wordRequires Option as Meta on macOS. | Windows / macOS / LinuxAlt + B |
| Move forward one wordRequires Option as Meta on macOS. | Windows / macOS / LinuxAlt + F |
| Delete from the cursor to the end of the line | Windows / macOS / LinuxCtrl + K |
| Delete from the cursor to the start of the line | Windows / macOS / LinuxCtrl + U |
| Delete the previous word | Windows / macOS / LinuxCtrl + W |
| Delete the next wordRequires Option as Meta on macOS. | Windows / macOS / LinuxAlt + D |
| Paste the most recently deleted text | Windows / macOS / LinuxCtrl + Y |
| Cycle through deleted-text historyPress after Ctrl+Y. Requires Option as Meta on macOS. | Windows / macOS / LinuxAlt + Y |
| Undo the last input editCtrl+Shift+- also works. | Windows / macOS / LinuxCtrl + _ |
| Paste an image from the clipboardiTerm2 on macOS also accepts Cmd+V; Windows and WSL use Alt+V for image paste. | WindowsAlt + V macOS / LinuxCtrl + V |
Multiline input
Add a line break without sending the prompt, including the fallback forms that work across terminal emulators.
| Action | Shortcuts |
|---|---|
| Insert a line break with backslash then EnterWorks in every terminal. | Windows / macOS / Linux\ then Enter |
| Insert a line break | Windows / macOS / LinuxCtrl + J |
| Insert a line break on macOSOption must be configured as Meta in some terminals. | Windows / LinuxNot documented macOSOption + Enter |
| Insert a line break with Shift+EnterAvailable in terminals configured with /terminal-setup or native Shift+Enter support. | Windows / macOS / LinuxShift + Enter |
Prompt prefixes
A leading character changes how an otherwise ordinary prompt is interpreted.
| Action | Shortcuts |
|---|---|
| Open slash commands and skillsType it at the start of an empty prompt. | Windows / macOS / Linux/ |
| Run the line as a shell command | Windows / macOS / Linux! |
| Mention a file or other resource | Windows / macOS / Linux@ |
| Open an emoji shortcodeAvailable in current Claude Code versions that support emoji shortcodes. | Windows / macOS / Linux: |
Transcript and help
Use the help panel, fullscreen transcript, and voice input controls when the response is already on screen.
| Action | Shortcuts |
|---|---|
| Open or navigate the theme picker | Windows / macOS / LinuxCtrl + T |
| Open shortcut help | Windows / macOS / Linux? |
| Start or stop voice inputHold or tap Space according to the voice-input state. | Windows / macOS / LinuxSpace |
| Open transcript shortcut helpUse inside the transcript viewer. | Windows / macOS / Linux? |
| Move to the previous user prompt in the transcript | Windows / macOS / Linux{ |
| Move to the next user prompt in the transcript | Windows / macOS / Linux} |
| Show the full transcript in the classic viewer | Windows / macOS / LinuxCtrl + E |
| Write the full conversation to terminal scrollbackAvailable in the fullscreen transcript viewer. | Windows / macOS / Linux[ |
| Open the transcript in your editorLowercase v is the current fullscreen-transcript binding. | Windows / macOS / Linuxv |
| Close the transcript viewerCtrl+C and Esc also close it. | Windows / macOS / Linuxq |
Source
official Claude Code interactive mode reference · Checked
Interactive-mode shortcuts from the official Claude Code docs checked August 26, 2026. Keys vary by terminal. On macOS, Option must be configured as Meta for Alt-style text editing. The readline flavor changes some editing defaults in Claude Code v2.1.238 and later.