You pressed Shift+Tab for plan mode and nothing changed. Ctrl+C pressed twice closed the whole session when you only meant to clear the prompt. You typed a path and the prompt started suggesting files at you. Claude Code’s prompt has a small set of prefixes and keys, and 10 minutes with them is the difference between fighting the terminal and driving it.
This post is the Windows set: the 3 prompt prefixes, the Shift+Tab mode cycle, stopping and undoing, editing a long prompt, and changing the keys you do not like. Everything is from the current docs, linked at the end; the docs note that shortcuts can vary by terminal, and the Windows cases where that matters are called out. Type ? on an empty prompt at any time for the built-in help panel.
The Prefixes: /, ! and @
/plan tidy up the logging a command or a skill ! git status shell mode: runs the command now, output lands in the conversation @src/config.ps1 a file mention, with autocomplete ? the shortcut help panel (empty prompt only)
/ at the start is a built-in command or a skill. Type / alone for the menu, or / and a few letters to filter it. Completion also works partway through a prompt: run the tests, then /com offers the commands starting with those letters, and Tab inserts the match; a path such as /tmp/notes.md does not keep a list open. A command only runs when it starts your message. The skills post is where your own commands come from.
! at the start is shell mode. The command runs straight away without Claude interpreting or approving it, you see its output live, and the command and output are added to the conversation. Claude then responds to that output on its own, so ! npm test gets you an explanation of the failures without a second prompt; that reply costs the same as a normal prompt. If you only want the output in context, set respondToBashCommands to false in settings.json. In shell mode, Tab completes from your previous ! commands in the project, a token with a forward slash in it opens a file dropdown (forward slashes on Windows too; the dropdown is triggered by /, not \), and Esc, Backspace or Ctrl+U on an empty prompt leaves shell mode. Pasting text that starts with ! into an empty prompt enters shell mode too.
@ anywhere in a prompt triggers file path autocomplete. Partial names fuzzy-match, and a trailing slash means a folder. In the VS Code extension, Alt+K inserts an @-mention of the current file and selection with line numbers; the VS Code post has the rest of the panel keys.
Shift+Tab: Cycle the Permission Mode
Shift+Tab cycles the permission mode. The order is default, which the mode indicator labels Manual, then acceptEdits, then plan, then back. When they are available, bypassPermissions and then auto slot in after plan. From auto, which is the starting mode for terminal sessions from version 2.1.283, the first press goes to default. The status bar under the prompt shows the result: manual mode on, accept edits on, plan mode on, auto mode on.
On Windows, if Shift+Tab does nothing, the docs give Alt+M: it applies when the Node or Bun runtime does not enable VT input mode in your terminal. The same key has a second job on a file permission prompt: with no comment field open it selects the option that allows the action for the rest of the session, when the prompt offers one. The permissions post covers what each mode means and the plan mode post covers plan mode on its own.
Stop, Exit, Undo
Esc interrupt Claude mid-turn; the work done so far is kept Esc Esc with text in the prompt: clear it (Up brings it back); on an empty prompt: the rewind menu Ctrl+C interrupt; if nothing is running, clears the prompt, and a second press exits Ctrl+D exit; the first press shows a hint, a second within 800 ms exits Ctrl+L redraw a garbled screen, keeps everything Ctrl+O toggle the transcript viewer (full tool detail, timestamps, model per message) Ctrl+B move the running command or agent to the background Ctrl+X Ctrl+K stop every background subagent; press twice within 3 seconds Ctrl+T show or hide Claude's task checklist Ctrl+S stash the prompt text; press again on an empty prompt to restore it
The 2 that matter most are the first 2. Esc stops the current response or tool call so you can redirect, and what Claude already did stays. Esc twice on an empty prompt opens the rewind menu, which restores the code, the conversation or both to an earlier prompt; Rewind Claude Code Edits With Checkpoints goes through the options. Ctrl+C is the one that bites: on an idle session it clears the prompt, and the next press ends the session. A draft you cleared by accident comes back with Up.
Ctrl+Z suspends Claude Code to the shell on Unix only; it is not a Windows shortcut. Ctrl+O also expands the lines that collapse by default, such as a run of MCP calls shown as a single line.
Edit a Longer Prompt
\ then Enter new line without sending (works in every terminal) Ctrl+J new line, works in every terminal Shift+Enter new line: native in Windows Terminal; run /terminal-setup once in VS Code's terminal Ctrl+A / Ctrl+E start / end of the current line Ctrl+K / Ctrl+U delete to end of line / to start of line Ctrl+W delete back to the previous whitespace (a whole path in one press) Ctrl+Backspace delete the previous word only Ctrl+Y paste what you last deleted; Alt+Y after it cycles older deletions Alt+B / Alt+F back / forward one word; Alt+D deletes to end of word Ctrl+_ undo the last edit to the prompt Ctrl+G open the prompt in your default text editor Up / Down move within a wrapped prompt, then step through history Ctrl+R reverse search the prompt history Alt+V paste an image from the clipboard on Windows and WSL (on WSL Ctrl+V is bound too) Tab accept an autocomplete suggestion
History is kept per working directory and reaches back into earlier sessions of the same project, so Up on an empty prompt is often faster than retyping. Ctrl+R searches it: type part of the prompt, Ctrl+R again for older matches, Tab or Esc to take the match into the prompt and keep editing, Enter to send it. In fullscreen rendering the search is a dialog instead, and Ctrl+S there cycles the scope between this session, this project and all projects. From version 2.1.314 the search also matches words inside text you pasted into a prompt, which is how you find the prompt that carried an error log.
Ctrl+G is the one to remember for a prompt that has outgrown the input box: it opens your default editor, you write there, save, and the text comes back to the prompt. It also edits a custom response when Claude asks you a question.
A Windows quirk: if each Backspace deletes a whole word, your terminal is sending ^H, which Claude Code reads as Ctrl+Backspace on Windows. Set the environment variable CLAUDE_CODE_BS_AS_CTRL_BACKSPACE=0 and both keys erase 1 character again.
Model, Thinking and the Queue
Alt+P switch model without losing your prompt Alt+T toggle extended thinking (no effect on models that always think) Alt+O toggle fast mode Enter (while busy) queue the message; Claude reads it when the current tool calls finish Ctrl+Enter send the queued messages now (Ctrl+X Ctrl+S in terminals that do not report Ctrl+Enter) Up (first row) take queued messages back into the prompt
Queueing is worth knowing: pressing Enter while Claude is working does not interrupt it. Messages queue and go to Claude as soon as the running tool calls finish, within the same turn; commands and ! shell commands wait until the turn ends and then run in order. Queued entries show in grey until Claude starts on them. Esc interrupts the turn and sends what you queued straight away.
Make the Keys Your Own
/keybindings creates or opens ~\.claude\keybindings.json. It is an object with a bindings array, each block naming a context and a map of keys to actions. This binds Ctrl+E to the external editor in the chat input and unbinds Ctrl+S:
{
"$schema": "https://www.schemastore.org/claude-code-keybindings.json",
"bindings": [
{
"context": "Chat",
"bindings": {
"ctrl+e": "chat:externalEditor",
"ctrl+s": null
}
}
]
}
Changes are picked up without a restart. Contexts include Global, Chat, Confirmation for permission dialogs, Transcript and HistorySearch; the keybindings page lists the rest with every action name. 2 limits: the text-editing keys in the table above (Ctrl+A, Ctrl+W, Alt+B and friends) have no actions and cannot be remapped, and Enter versus Shift+Enter is swapped by mapping chat:newline and chat:submit rather than by a terminal setting.
If you live in vim, /config has an Editor mode switch for vim-style editing in the prompt, with Esc for NORMAL mode and the usual motions and operators. vimInsertModeRemaps in your user settings maps a 2-key sequence such as jj to Escape; it is read from user settings, --settings and managed settings only, so a checked-out repo cannot remap your keys.
Other Considerations
Shortcuts depend on the terminal. Windows Terminal sends Shift+Enter natively; VS Code’s integrated terminal needs /terminal-setup once; Ctrl+Enter arrives as a plain Enter in terminals that do not report extended keys, which is why Ctrl+X Ctrl+S exists. When a key does nothing, the terminal is the first suspect, not the setting.
? and : are prefixes too. ? on an empty prompt toggles the help panel (with text in the prompt it is just a question mark), and : followed by 2 or more letters opens an emoji picker, or a full :name: inserts one; emojiCompletionEnabled: false turns that off.
Ctrl+T has 2 jobs. In a session it toggles Claude’s task checklist; inside the /theme picker it toggles syntax highlighting for code blocks. Neither is the background-task view; that is /tasks.
Shell mode runs outside the sandbox. Sandboxing, where it applies, covers the commands Claude runs, not the ones you type after !. On native Windows there is no sandbox either way.
Shell history expansion is off by default. A ! later in a prompt is not expanded; only ! at the start is shell mode.
Frequently Asked Questions
Shift+Tab does nothing in my Windows terminal. What now?
Press Alt+M. The docs list it as the Windows fallback for when the Node or Bun runtime does not enable VT input mode. /plan at the start of a prompt is another way into plan mode, and with a task after it Claude starts planning that task.
How do I add a new line without sending?
Type \ and press Enter, or press Ctrl+J; both work everywhere. Shift+Enter works in Windows Terminal without setup and in VS Code’s terminal after /terminal-setup.
Can I run a command without Claude touching it?
Start the prompt with !. The command runs directly, with no approval step, and the output goes into the conversation. Claude still replies to the output unless respondToBashCommands is false.
How do I stop Claude without losing what it has done?
Esc. The current response or tool call stops and everything done so far stays. To undo edits as well, press Esc twice on an empty prompt and pick a restore point from the rewind menu.
Can I change a shortcut I keep hitting by accident?
Most of them. /keybindings opens the file; set the key to null in the right context to unbind it, or to another action to move it. The readline-style editing keys are fixed.
Related
- Claude Code on Windows: The Complete Guide
- Plan Mode in Claude Code: Read First, Edit After
- Claude Code Permissions: Allow and Deny Rules in settings.json
- Rewind Claude Code Edits With Checkpoints
- Resume a Claude Code Session With –continue and –resume
- Claude Code in VS Code on Windows: the Extension, the CLI and WSL
- Custom Slash Commands in Claude Code With Skills
- Install Claude Code on Windows, Native and in WSL
- Claude Code docs: interactive mode, the full shortcut reference
- Claude Code docs: customize keyboard shortcuts
- Claude Code docs: terminal configuration, including Shift+Enter and the Windows Backspace fix
If SQL Server is part of your day job, my current work lives over at sqldba.blog: production DBA scripts, an error library and the SSMS guide.
Leave a Reply