Keyboard shortcuts
Keyboard shortcuts may vary by platform and terminal. In fullscreen rendering, press ? in the transcript viewer to see available shortcuts there.
macOS users: Option/Alt key shortcuts (Alt+B, Alt+F, Alt+D, Alt+Y, Alt+P) require configuring Option as Meta in your terminal. See Enable Option key shortcuts on macOS for the setting in each terminal.
General controls
| Shortcut | Description | Context |
|---|---|---|
Ctrl+C | Interrupt, or clear input | Interrupts a running operation. If nothing is running, the first press clears the prompt input and a second press exits Claude Code |
Ctrl+X Ctrl+K | Stop all running background subagents in this session, and turn off artifact auto-replies for the rest of it. Press twice within 3 seconds to confirm | Subagent control |
Ctrl+D | Exit Claude Code session | The first press shows a confirmation hint and a second press within 800ms exits. When the prompt has text, Ctrl+D deletes the character after the cursor instead |
Ctrl+G or Ctrl+X Ctrl+E | Open in default text editor | Edit your prompt or custom response in your default text editor. Ctrl+X Ctrl+E is the readline-native binding. Turn on Show last response in external editor in /config to prepend Claude's previous reply as #-commented context above your prompt; Claude Code strips the comment block when you save |
Ctrl+L | Redraw or clear the screen | Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank. In fullscreen rendering, it also clears the screen, and you can scroll up to see the earlier messages |
Ctrl+O | Toggle transcript viewer | Shows detailed tool usage and execution, with a timestamp and the model used on each assistant message. Also expands lines that collapse by default, such as MCP calls, shown as a single Called slack 3 times line, and messages from your other sessions, shown as a one-line Message from @<sender> preview |
Ctrl+R | Reverse search command history | Search through previous commands interactively |
Ctrl+V or Cmd+V (iTerm2) or Alt+V (Windows and WSL) | Paste image from clipboard | Inserts an [Image #N] chip at the cursor so you can reference it positionally in your prompt. On WSL, both Ctrl+V and Alt+V are bound; use Alt+V if your terminal intercepts Ctrl+V |
Ctrl+B | Background running tasks | Backgrounds Bash commands and agents. Tmux users press twice |
Ctrl+T | Toggle Claude's task checklist | Show or hide Claude's to-do checklist in the status area. This is not the background-task view; use /tasks to see running shells and subagents |
Ctrl+S | Stash or restore prompt | With text in the input, stashes it and clears the prompt. Pressed again on an empty prompt, restores the stashed text, cursor position, and pasted content |
Ctrl+Z | Suspend Claude Code | Unix only. Suspends the process to your shell; run fg to resume |
Left/Right arrows | Cycle through dialog tabs | Navigate between tabs in permission dialogs and menus |
Tab | Accept an autocomplete suggestion, or add a comment to a permission answer | While autocomplete suggestions are showing in the prompt input, accepts the selected suggestion. On most permission prompts, with Yes or No focused, opens a comment field on that option, and pressing it again closes the field. See add a comment when you answer a permission prompt |
Up/Down arrows or Ctrl+P/Ctrl+N | Move cursor or navigate command history | When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. While you have messages queued, Up from the first row instead takes them back |
Esc | Interrupt Claude, or close a dialog | Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. If you have messages queued, Claude Code sends them next. When a dialog is open, Esc closes the dialog. On a permission prompt, Esc declines the action, the same as No without a comment |
Esc + Esc | Clear input draft, or rewind | When the prompt input contains text, double Esc clears it and saves the draft to history so Up recalls it. When the input is empty, double Esc opens the rewind menu to restore or summarize code and conversation from a previous point |
Shift+Tab, or Alt+M on Windows when the Node or Bun runtime doesn't enable VT input mode | Cycle permission modes | Cycle through default (labeled Manual in the mode indicator), acceptEdits, plan, and, when available, bypassPermissions and then auto. From auto, the first press switches to default. See permission modes. On a file permission prompt, the same key closes an open comment field. With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option |
Option+P (macOS) or Alt+P (Windows/Linux) | Switch model | Switch models without clearing your prompt |
Option+T (macOS) or Alt+T (Windows/Linux) | Toggle extended thinking | Enable or disable extended thinking mode. Has no effect on Fable 5.1 or Fable 5, which always use extended thinking. Works on macOS without configuring Option as Meta |
Option+O (macOS) or Alt+O (Windows/Linux) | Toggle fast mode | Enable or disable fast mode |
Text editing
| Shortcut | Description | Context |
|---|---|---|
Ctrl+A | Move cursor to start of current line | In multiline input, moves to the start of the current logical line |
Ctrl+E | Move cursor to end of current line | In multiline input, moves to the end of the current logical line |
Ctrl+K | Delete to end of line | Stores deleted text for pasting |
Ctrl+U | Delete from cursor to line start | Stores deleted text for pasting. Repeat to clear across lines in multiline input. On macOS, terminal emulators including iTerm2 and Terminal.app map Cmd+Backspace to this shortcut |
Ctrl+W | Delete back to previous whitespace | Stores deleted text for pasting. One press removes a whole path or --flag=value. To delete only the previous word, press Option+Delete on macOS or Ctrl+Backspace on Windows |
Ctrl+Y | Paste deleted text | Pastes the text you last deleted with one of the word or line deletion shortcuts, such as Ctrl+K, Ctrl+U, or Ctrl+W |
Alt+Y (after Ctrl+Y) | Cycle paste history | After pasting, cycle through previously deleted text. Requires Option as Meta on macOS |
Alt+B | Move cursor back one word | Word navigation. Requires Option as Meta on macOS |
Alt+F | Move cursor forward one word | Moves to the end of the current word, or to the end of the next word when the cursor is between words. Requires Option as Meta on macOS |
Alt+D | Delete to end of word | Deletes to the end of the current word, or to the end of the next word when the cursor is between words. Stores deleted text for pasting. Requires Option as Meta on macOS |
Ctrl+_ or Ctrl+Shift+- | Undo last input edit | Restores the previous input text and cursor position |
Word boundaries in editing shortcuts
The word shortcuts Alt+B, Alt+F, Alt+D, Option+Delete, and Ctrl+Backspace treat a word as a run of letters and digits, so punctuation such as _, ., and / separates words. With src/utils/foo.ts in the prompt, repeated presses of Alt+B stop at the start of ts, foo, utils, and src.
Ctrl+W is different: it ignores punctuation and deletes back to the previous whitespace, so one press removes all of src/utils/foo.ts.
In text written without spaces, such as Chinese or Japanese, the word shortcuts still move or delete one word at a time.
These readline conventions apply in Claude Code v2.1.261 and later. The keybindingFlavor setting that turned them on in earlier versions is deprecated and has no effect.
You can't remap these shortcuts in the keybindings configuration file, which has no actions for them.
Theme and display
| Shortcut | Description | Context |
|---|---|---|
Ctrl+T | Toggle syntax highlighting for code blocks | Only works inside the /theme picker menu. Controls whether code in Claude's responses uses syntax coloring |
Multiline input
| Method | Shortcut | Context |
|---|---|---|
| Quick escape | \ + Enter | Works in all terminals |
| Option key | Option+Enter | After enabling Option as Meta on macOS |
| Shift+Enter | Shift+Enter | Native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, Windows Terminal. For other terminals, see Enter multiline prompts |
| Control sequence | Ctrl+J | Works in any terminal without configuration |
| Paste mode | Paste directly | For code blocks, logs |
Quick commands
| Shortcut | Description | Notes |
|---|---|---|
/ at start | Command or skill | See commands and skills |
! at start | Shell mode | Run a command directly, add its output to the session, and have Claude respond to it |
@ | File path mention | Trigger file path autocomplete. In sessions with cross-session messaging, when you type at least one letter after the @, Claude Code also suggests your other live sessions on this machine, so you can tell Claude to message the one you pick. Requires Claude Code v2.1.232 or later |
: | Emoji shortcode | Type a full :name: to insert the emoji, or two or more characters for suggestions. See Emoji shortcodes. Requires Claude Code v2.1.217 or later |
? on empty input | Toggle the shortcut help panel | Typing ? when the input already contains text inserts the character |
Transcript viewer
When the transcript viewer is open (toggled with Ctrl+O), these shortcuts are available. Run /tui with no argument to check which renderer is active. Ctrl+E can be rebound via transcript:toggleShowAll.
| Shortcut | Description |
|---|---|
? | Toggle the keyboard shortcut help panel. Requires fullscreen rendering |
\{ / \} | Jump to the previous or next user prompt, like vim paragraph motion. Requires fullscreen rendering |
Ctrl+E | Toggle show all content. Available in the classic renderer only, not in fullscreen rendering |
[ | Write the full conversation to your terminal's native scrollback so Cmd+F, tmux copy mode, and other native tools can search it. Requires fullscreen rendering |
v | Write the conversation to a temporary file and open it in $VISUAL or $EDITOR. Requires fullscreen rendering |
q, Ctrl+C, Esc | Exit transcript view. All three can be rebound via transcript:exit |
Voice input
| Shortcut | Description | Notes |
|---|---|---|
Hold or tap Space | Voice dictation | Requires voice dictation to be enabled. Hold to record, or run /voice tap for tap-to-toggle. Rebindable |