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 repliesThe second press confirms. | Windows / macOS / LinuxCtrl + X then Ctrl + K then Ctrl + X then Ctrl + K |
| Move running Bash commands and agents to the backgroundIn tmux, press it twice. | Windows / macOS / LinuxCtrl + B |
| Exit the sessionOn an empty prompt, press twice within 800 ms to exit. With prompt text, Ctrl+D deletes the next character. | 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 shellRun fg in your shell to resume. Not available on Windows. | WindowsNot documented macOS / LinuxCtrl + Z |
| Move between dialog tabs | Windows / macOS / LinuxLeftorRightUse the arrows while the tab row has focus. |
| 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 modes | WindowsShift + TaborAlt + MAlt+M works when the Node or Bun runtime does not enable VT input mode. 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 thinkingHas no effect with models that always use extended thinking. | Windows / LinuxAlt + T macOSOption + T |
| Toggle fast mode | Windows / LinuxAlt + O macOSOption + O |
| Enable Vim-style editingTurn it on in /config under Editor mode. Esc enters NORMAL mode and i enters INSERT mode. | 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 historyIn the classic view, Enter runs the match and Tab keeps it for editing. | Windows / macOS / LinuxCtrl + R |
| Open the current prompt in the external editor | Windows / macOS / LinuxCtrl + GorCtrl + X then Ctrl + E |
| Toggle 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 back to the previous space | 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 historyRequires Option as Meta on macOS. | Windows / macOS / LinuxCtrl + Y then Alt + 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 |
|---|---|
| Toggle syntax highlighting for code blocksOnly works inside 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
Shortcuts can vary by terminal; on macOS, set Option as Meta for Alt+B/F/D/Y/P. From v2.1.261, word keys follow readline word boundaries.