Claude Code keyboard shortcuts worth learning
Claude Code has a long list of shortcuts. You will not need most of them. These are the ones that save the most time, grouped by what you are doing. Press ? on an empty prompt to see the list for your setup.
Stop, undo, leave
EscStops the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. In a dialog, it closes the dialog.EsctwiceWith text in the prompt, clears it and saves the draft so the Up arrow brings it back. With an empty prompt, opens the rewind menu.Ctrl+CInterrupts a running operation. If nothing is running, the first press clears the prompt and a second press exits.Ctrl+DExits. The first press shows a hint, and a second press within a moment exits. With text in the prompt, it deletes the character after the cursor instead.Ctrl+_Undoes the last edit to your prompt text.
Modes and model
Shift+TabCycles the permission modes. On Windows,Alt+Mdoes the same when your Node or Bun runtime does not enable VT input mode.Option+P/Alt+PSwitches the model without clearing your prompt (Option on macOS, Alt on Windows and Linux).Option+O/Alt+OToggles fast mode.
Write longer prompts
\thenEnterA new line. Works in every terminal.Ctrl+JA new line, with no setup, in any terminal.Shift+EnterA new line. Works out of the box in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal. Other terminals need a setting.Ctrl+GOpens your prompt in your default text editor.Ctrl+SStashes the prompt you are typing and clears the box. Press it again on an empty prompt to bring the text back.Ctrl+V/Alt+VPastes an image from the clipboard (Alt+Von Windows and WSL).
Start a prompt with a symbol
/A command or a skill. Type letters after it to filter the list.!Shell mode: runs a command directly, adds its output to the session and has Claude respond to it.@Mentions a file, with path autocomplete.?On an empty prompt, shows the shortcut help panel.
Look back and keep track
Ctrl+RSearches your earlier prompts.Ctrl+OOpens the transcript viewer, with detailed tool usage and a timestamp and the model on each reply. It also expands lines that are collapsed by default.Ctrl+TShows or hides Claude's task checklist.Ctrl+BMoves running shell commands and agents to the background. Tmux users press it twice.Ctrl+LRedraws the screen if the display gets garbled. Your input and conversation stay.
Edit text fast
Ctrl+A/Ctrl+EJump to the start or the end of the line.Ctrl+K/Ctrl+UDelete to the end or to the start of the line. The deleted text is kept for pasting.Ctrl+WDeletes back to the previous whitespace, so one press removes a whole path such assrc/utils/foo.ts.Ctrl+YPastes what you last deleted with one of those shortcuts.
Good to know
- Shortcuts vary by platform and terminal. On macOS, the
Alt-based word shortcuts (Alt+B,Alt+F,Alt+D) need Option set as Meta in your terminal. - Claude Code has a file for your own keyboard shortcuts,
keybindings.json. The word-editing shortcuts above cannot be remapped there. For where the file lives, see the .claude folder explained. - Some details depend on your version. Check the documentation page for yours.
Try it on something harmless
- Type a long sentence, press
Esctwice, thenUpto get it back. - Press
?on an empty prompt and read the panel. - Press
Ctrl+Oonce to see the transcript viewer, thenEscto leave it.
This follows Anthropic's interactive mode documentation as we read it in October 2026. We are not affiliated with Anthropic. We wrote this from the documentation and have not tested every shortcut on every terminal.
See also: Customize keyboard shortcuts · Set up your terminal · Slash commands worth knowing · Claude Code voice dictation.
The free loop-stop skill gives long tasks a limit and a stop rule. If you want a second pair of eyes on your CLAUDE.md and settings, the Tune-Up Kit is a checklist for exactly that.