Shortcuts
Ctrl+D deletes the character after the cursor instead.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.Called slack 3 times line, and messages from your other sessions, shown as a one-line Message from @<sender> preview.[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./tasks to see running shells and subagents.! shell command comes back in shell mode.fg to resume.Up from the first row instead takes them back.Esc closes the dialog. While a footer item is selected, such as a row in the subagent panel below the prompt, Esc deselects it instead of interrupting. On a permission prompt, Esc declines the action, the same as No without a comment.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.Ctrl+Enter arrives as plain Enter; Ctrl+X Ctrl+S works in any terminal. Requires Claude Code v2.1.275 or later.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.Cmd+Backspace to this shortcut.--flag=value. To delete only the previous word, press Option+Delete on macOS or Ctrl+Backspace on Windows.Ctrl+K, Ctrl+U, or Ctrl+W./theme picker menu. Controls whether code in Claude's responses uses syntax coloring.@, 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.:name: to insert the emoji, or two or more characters for suggestions. See Emoji shortcodes.? when the input already contains text inserts the character.Cmd+F, tmux copy mode, and other native tools can search it. Requires fullscreen rendering.$VISUAL or $EDITOR. Requires fullscreen rendering.transcript:exit./voice tap for tap-to-toggle. Rebindable.Ctrl+[ requires v2.1.242 or later. INSERT, VISUAL.{char}.% jumps to. Requires Claude Code v2.1.301 or later.{char}./btw answers. Shift+Left moves to older answers and Shift+Right returns toward the current one. [ and ] do the same, for terminals that don't report Shift with arrow keys. Tab / Shift+Tab cycle through the same answers. Requires Claude Code v2.1.257 or later. Between v2.1.187 and v2.1.256, the keys were plain Left / Right./btw exchanges shown above the current answer.Rebindable actions
Default key for every action you can remap in keybindings.json, grouped by context.
app:interrupt.app:exit.app:redraw./tasks background-task view Action: app:toggleTodos.app:toggleTranscript.history:search.history:previous.history:next.chat:cancel.chat:clearInput.chat:clearInput. See Clear the conversation for how Cmd+K behaves on iTerm2 and Terminal.app Action: chat:clearScreen.chat:killAgents.chat:cycleMode.chat:modelPicker.chat:fastMode.chat:thinkingToggle.chat:submit.chat:submit, it submits the draft even while an autocomplete suggestion is highlighted. Requires v2.1.247 or later Action: chat:queueSubmit.Ctrl+Enter as plain Enter, so Ctrl+X Ctrl+S is the binding that works in any terminal. Requires v2.1.275 or later Action: chat:sendNow.chat:newline.chat:undo.chat:externalEditor.chat:stash.chat:imagePaste./<name>. For example, "meta+g": "command:compact" in a Chat block makes Meta+G run /compact Action: command:<name>.autocomplete:accept.autocomplete:dismiss.autocomplete:previous.autocomplete:next.confirm:yes.confirm:no.confirm:previous.confirm:next./fast dialog, turn fast mode on or off Action: confirm:nextField.keybindings.json that names it remains valid Action: confirm:previousField.confirm:toggle.confirm:cycleMode.keybindings.json that names it remains valid Action: permission:toggleDebug.transcript:toggleShowAll.transcript:exit.historySearch:next.historySearch:accept.historySearch:cancel.historySearch:execute.historySearch:cycleScope.task:background.theme:toggleSyntaxHighlighting.help:dismiss.tabs:next.tabs:previous.attachments:next.attachments:previous.attachments:remove.attachments:exit.diff:dismiss.diff:previousSource.diff:nextSource.diff:previousFile.diff:nextFile.diff:dismiss. The previous default of Left in the detail view was removed in v2.1.203 Action: diff:back.scroll:pageUp.scroll:pageDown.scroll:fullPageUp.scroll:fullPageDown.scroll:top.scroll:bottom.app:toggleReplTab.app:cycleDiffBase.app:diffFileListUp.app:diffFileListDown.app:toggleDiffNoiseFilter.app:toggleDiffPreSession.modelPicker:decreaseEffort.modelPicker:increaseEffort.modelPicker:thisSessionOnly.effortSlider:decreaseEffort.effortSlider:increaseEffort.effortSlider:thisSessionOnly.select:next.select:previous.select:pageUp.select:pageDown.select:first.select:last.select:accept.select:cancel.plugin:toggle.plugin:install.plugin:favorite.abovePrompt:toggle.abovePrompt:focus.abovePrompt:next.abovePrompt:previous.abovePrompt:press.abovePrompt:leave.abovePrompt:highlightNext.abovePrompt:highlightPrevious.pane:scrollUp.pane:scrollDown.pane:pageUp.pane:pageDown.pane:top.pane:bottom.pane:grow.pane:shrink.pane:close.pane:next.pane:previous.settings:search.settings:retry./usage recommendations Claude Code can apply, when the /usage footer offers a fix. Requires v2.1.305 or later Action: settings:fixUsage.select:accept.confirm:no.agents:switchView.agents:togglePin.n: filter. Requires v2.1.288 or later Action: agents:find.agents:previousGroup.agents:nextGroup./voice mode Action: voice:pushToTalk.scroll:lineUp.scroll:lineDown.scroll:pageUp.scroll:pageDown.scroll:top.scroll:bottom.scroll:pageUp, provided for vi-style rebinds Action: scroll:halfPageUp.scroll:pageDown, provided for vi-style rebinds Action: scroll:halfPageDown.scroll:fullPageUp.scroll:fullPageDown.selection:copy.selection:clear.selection:extendLeft.selection:extendRight.selection:extendUp.selection:extendDown.selection:extendLineStart.selection:extendLineEnd.Rebinding keys
Run /keybindings to create or open ~/.claude/keybindings.json. Each binding names a context and maps a key to an action from the table above:
{
"bindings": [
{ "context": "Chat", "bindings": { "ctrl+e": "chat:externalEditor" } }
]
}Contexts: Global, Chat, Autocomplete, Settings, Confirmation, Tabs, Help, Transcript, HistorySearch, Task, ThemePicker, Attachments, Footer, MessageSelector, DiffDialog, DiffPanel, ModelPicker, EffortSlider, Select, Plugin, AbovePrompt, AbovePromptInput, AbovePromptSelect, Pane, PaneField, Agents, Scroll.
Frequently asked questions
How do I add a new line in Claude Code without sending?
Type a backslash then Enter, or press Ctrl+J, in any terminal. Shift+Enter works natively in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal. Option+Enter works on macOS once Option is set to act as Meta.
What does Shift+Tab do in Claude Code?
It cycles permission modes: default (labelled Manual), acceptEdits, plan, and, when available, bypassPermissions and auto. The current mode shows under the prompt.
How do I stop Claude in the middle of a response?
Press Esc. Claude stops the current response or tool call and keeps the work done so far, so you can redirect it. Press Esc twice on an empty prompt to rewind to an earlier point in the conversation.
Can I change Claude Code keyboard shortcuts?
Yes. Run /keybindings to open ~/.claude/keybindings.json and rebind any action listed in the second table on this page, per context (Chat, Global, Transcript and so on). Changes apply without a restart.
Does Claude Code have vim mode?
Yes. Turn it on with /config (Editor mode) and the prompt supports NORMAL, INSERT and VISUAL modes with the motions, operators and text objects listed on this page.
Sources: Interactive mode, Keybindings. Claude Code Agents is an independent site, not affiliated with Anthropic.