Reference· Updated 2026-11-03

Claude Code Keyboard Shortcuts

Every Claude Code keyboard shortcut (126), including multiline input, vim mode and the transcript viewer, plus all 147 rebindable actions for keybindings.json. Press ? on an empty prompt in Claude Code to open the shortcut help.

Shortcuts

126 of 126 shortcuts
Ctrl+C
General controls
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. To get a cleared draft back, see Bring back a cleared draft.
Ctrl+X Ctrl+K
General controls
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. You can press it while a background subagent's permission prompt is open. Subagent control.
Ctrl+D
General controls
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
General controls
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
General controls
Redraw the screen. Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank. See Clear the conversation for fullscreen rendering.
Ctrl+O
General controls
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
General controls
Reverse search command history. Search through previous commands interactively.
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
General controls
Background running tasks. Backgrounds Bash commands and agents. Tmux users press twice.
Ctrl+T
General controls
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
General controls
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, pasted content, and input mode, so a stashed ! shell command comes back in shell mode.
Ctrl+Z
General controls
Suspend Claude Code. Unix only. Suspends the process to your shell; run fg to resume.
Left/Right arrows
General controls
Cycle through dialog tabs. Navigate between tabs in permission dialogs and menus. In a tabbed dialog, the keys switch tabs while the tab row has focus. See Tabs actions for how focus moves.
Tab
General controls
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.
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
General controls
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. 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 + Esc
General controls
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.
Send queued messages now. Sends your queued messages, and your draft with them, right away. When Claude Code sends what you queued covers what happens to the turn Claude is working on. In shell mode, the key only queues your command. In terminals that don't report extended keys, Ctrl+Enter arrives as plain Enter; Ctrl+X Ctrl+S works in any terminal. Requires Claude Code v2.1.275 or later.
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.
Switch model. Switch models without clearing your prompt.
Toggle extended thinking. Enable or disable extended thinking mode. Has no effect on Opus 5.5, Sonnet 5.5, Haiku 5.5, or the Fable models, which always use extended thinking. Works on macOS without configuring Option as Meta.
Toggle fast mode. Enable or disable fast mode.
Ctrl+A
Text editing
Move cursor to start of current line. In multiline input, moves to the start of the current logical line.
Ctrl+E
Text editing
Move cursor to end of current line. In multiline input, moves to the end of the current logical line.
Ctrl+K
Text editing
Delete to end of line. Stores deleted text for pasting.
Ctrl+U
Text editing
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
Text editing
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
Text editing
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.
Cycle paste history. After pasting, cycle through previously deleted text. Requires Option as Meta on macOS.
Alt+B
Text editing
Move cursor back one word. Word navigation. Requires Option as Meta on macOS.
Alt+F
Text editing
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
Text editing
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.
Undo last input edit. Restores the previous input text and cursor position.
Ctrl+T
Theme and display
Toggle syntax highlighting for code blocks. Only works inside the /theme picker menu. Controls whether code in Claude's responses uses syntax coloring.
\ + Enter
Multiline input
Quick escape. Works in all terminals.
Option+Enter
Multiline input
Option key. After enabling Option as Meta on macOS.
Shift+Enter
Multiline input
Shift+Enter. Native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, Windows Terminal. For other terminals, see Enter multiline prompts.
Ctrl+J
Multiline input
Control sequence. Works in any terminal without configuration.
Paste directly
Multiline input
Paste mode. For code blocks, logs.
/ at start
Quick commands
Command or skill. See commands and skills.
! at start
Quick commands
Shell mode. Run a command directly, add its output to the session, and have Claude respond to it.
@
Quick commands
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.
:
Quick commands
Emoji shortcode. Type a full :name: to insert the emoji, or two or more characters for suggestions. See Emoji shortcodes.
? on empty input
Quick commands
Toggle the shortcut help panel. Typing ? when the input already contains text inserts the character.
?
Transcript viewer
Toggle the keyboard shortcut help panel. Requires fullscreen rendering.
{ / }
Transcript viewer
Jump to the previous or next user prompt, like vim paragraph motion. Requires fullscreen rendering.
Ctrl+E
Transcript viewer
Toggle show all content. Available in the classic renderer only, not in fullscreen rendering.
[
Transcript viewer
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
Transcript viewer
Write the conversation to a temporary file and open it in $VISUAL or $EDITOR. Requires fullscreen rendering.
q, Ctrl+C, Esc
Transcript viewer
Exit transcript view. All three can be rebound via transcript:exit.
Voice dictation. Requires voice dictation to be enabled. Hold to record, or run /voice tap for tap-to-toggle. Rebindable.
Esc or Ctrl+[
Mode switching
Enter NORMAL mode. In terminals that use the Kitty keyboard protocol, Ctrl+[ requires v2.1.242 or later. INSERT, VISUAL.
i
Mode switching
Insert before cursor. NORMAL.
I
Mode switching
Insert at beginning of line. NORMAL.
a
Mode switching
Insert after cursor. NORMAL.
A
Mode switching
Insert at end of line. NORMAL.
o
Mode switching
Open line below. NORMAL.
O
Mode switching
Open line above. NORMAL.
v
Mode switching
Start character-wise visual selection. NORMAL.
V
Mode switching
Start line-wise visual selection. NORMAL.
x
Editing (NORMAL mode)
Delete character.
r{char}
Editing (NORMAL mode)
Replace character under cursor with {char}.
dd
Editing (NORMAL mode)
Delete line.
D
Editing (NORMAL mode)
Delete to end of line.
dw/de/db
Editing (NORMAL mode)
Delete word/to end/back.
df{char}/dt{char}
Editing (NORMAL mode)
Delete to and including, or up to, the next occurrence of a character on the current line.
dj/dk
Editing (NORMAL mode)
Delete the current line and the line below or above.
dgg/dG
Editing (NORMAL mode)
Delete from the current line to the first or last line.
d0/c0/y0
Editing (NORMAL mode)
Delete, change, or yank from the cursor back to the beginning of the line. Requires Claude Code v2.1.281 or later.
d%/c%/y%
Editing (NORMAL mode)
Delete, change, or yank from the cursor through the bracket that % jumps to. Requires Claude Code v2.1.301 or later.
cc
Editing (NORMAL mode)
Change line.
C
Editing (NORMAL mode)
Change to end of line.
cw/ce/cb
Editing (NORMAL mode)
Change word/to end/back.
s
Editing (NORMAL mode)
Substitute character: delete the character under the cursor and enter INSERT mode.
S
Editing (NORMAL mode)
Substitute line: clear the line and enter INSERT mode.
yy/Y
Editing (NORMAL mode)
Yank (copy) line.
yw/ye/yb
Editing (NORMAL mode)
Yank word/to end/back.
p
Editing (NORMAL mode)
Paste after cursor.
P
Editing (NORMAL mode)
Paste before cursor.
>>
Editing (NORMAL mode)
Indent line.
<<
Editing (NORMAL mode)
Dedent line.
J
Editing (NORMAL mode)
Join lines.
u
Editing (NORMAL mode)
Undo.
.
Editing (NORMAL mode)
Repeat last change.
iw/aw
Text objects (NORMAL mode)
Inner/around word.
iW/aW
Text objects (NORMAL mode)
Inner/around WORD (whitespace-delimited).
i"/a"
Text objects (NORMAL mode)
Inner/around double quotes.
i'/a'
Text objects (NORMAL mode)
Inner/around single quotes.
i(/a(
Text objects (NORMAL mode)
Inner/around parentheses.
i[/a[
Text objects (NORMAL mode)
Inner/around brackets.
i{/a{
Text objects (NORMAL mode)
Inner/around braces.
d/x
Visual mode
Delete selection.
y
Visual mode
Yank selection.
c/s
Visual mode
Change selection.
p
Visual mode
Replace selection with register contents.
r{char}
Visual mode
Replace every selected character with {char}.
~/u/U
Visual mode
Toggle, lowercase, or uppercase selection.
>/<
Visual mode
Indent or dedent selected lines.
J
Visual mode
Join selected lines.
o
Visual mode
Swap cursor and anchor.
iw/aw/i"/…
Visual mode
Select a text object.
v/V
Visual mode
Toggle between character-wise and line-wise, or exit.
Space, Enter, Escape
Side questions with /btw
Dismiss the answer and return to the prompt.
Up / Down
Side questions with /btw
Scroll the answer.
Shift+Left / Shift+Right
Side questions with /btw
Step between this answer and your earlier /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.
c
Side questions with /btw
Copy the answer to your clipboard as raw Markdown. Use this instead of mouse selection, which captures the hard-wrapped terminal rendering rather than the source text.
f
Side questions with /btw
Start a forked subagent that inherits the parent conversation plus this question and answer, so it can continue with full tool access. You stay in the current session and find the fork in the panel below your prompt. Available in local sessions only.
x
Side questions with /btw
Clear the list of earlier /btw exchanges shown above the current answer.

Rebindable actions

Default key for every action you can remap in keybindings.json, grouped by context.

147 of 147 actions
Cancel current operation Action: app:interrupt.
Exit Claude Code. Press twice within 800ms to confirm Action: app:exit.
Force terminal redraw Action: app:redraw.
Toggle visibility of Claude's to-do checklist. This is not the /tasks background-task view Action: app:toggleTodos.
Toggle verbose transcript Action: app:toggleTranscript.
Up
History
Previous history item Action: history:previous.
Down
History
Next history item Action: history:next.
Escape
Chat
Cancel current input Action: chat:cancel.
Ctrl+L
Chat
Force a full screen redraw, preserving input and conversation Action: chat:clearInput.
Cmd+K
Chat
Same as chat:clearInput. See Clear the conversation for how Cmd+K behaves on iTerm2 and Terminal.app Action: chat:clearScreen.
Stop all running background subagents in this session and turn off artifact auto-replies for the rest of it. Press the shortcut twice within 3 seconds to confirm. You can press it while a background subagent's permission prompt is open Action: chat:killAgents.
Cycle permission modes Action: chat:cycleMode.
Meta+P
Chat
Open model picker Action: chat:modelPicker.
Meta+O
Chat
Toggle fast mode Action: chat:fastMode.
Meta+T
Chat
Toggle extended thinking Action: chat:thinkingToggle.
Enter
Chat
Submit message Action: chat:submit.
Submit the message, marked to wait its turn: while Claude is working, Claude Code queues it and never interrupts the turn. Unlike chat:submit, it submits the draft even while an autocomplete suggestion is highlighted. Requires v2.1.247 or later Action: chat:queueSubmit.
Send your queued messages, and your draft with them, right away. When Claude Code sends what you queued covers what happens to the turn Claude is working on. When nothing is running, the key submits the draft, and in shell mode it only queues the command. Terminals that don't report extended keys deliver 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.
Ctrl+J
Chat
Insert a newline without submitting Action: chat:newline.
Undo last action Action: chat:undo.
Open in external editor. The agent view dispatch input follows this action's single-keystroke bindings too Action: chat:externalEditor.
Ctrl+S
Chat
Stash current prompt Action: chat:stash.
Paste image from clipboard. On WSL, both shortcuts are bound by default Action: chat:imagePaste.
Run the command /<name>. For example, "meta+g": "command:compact" in a Chat block makes Meta+G run /compact Action: command:<name>.
Tab
Autocomplete
Accept suggestion Action: autocomplete:accept.
Escape
Autocomplete
Dismiss menu Action: autocomplete:dismiss.
Up
Autocomplete
Previous suggestion Action: autocomplete:previous.
Down
Autocomplete
Next suggestion Action: autocomplete:next.
Enter
Confirmation
Confirm action Action: confirm:yes.
Escape
Confirmation
Decline action Action: confirm:no.
Up
Confirmation
Previous option Action: confirm:previous.
Down
Confirmation
Next option Action: confirm:next.
Tab
Confirmation
In the /fast dialog, turn fast mode on or off Action: confirm:nextField.
(unbound)
Confirmation
Claude Code doesn't respond to this action, and a keybindings.json that names it remains valid Action: confirm:previousField.
Space
Confirmation
Toggle selection Action: confirm:toggle.
Shift+Tab\*
Confirmation
On a file permission prompt, closes an open comment field; with no field open, selects the option that allows the action for the rest of the session, when the prompt offers that option Action: confirm:cycleMode.
(unbound)
Permission
Claude Code doesn't respond to this action, and a keybindings.json that names it remains valid Action: permission:toggleDebug.
Ctrl+E
Transcript
Toggle show all content Action: transcript:toggleShowAll.
Exit transcript view Action: transcript:exit.
Ctrl+R
History search
Next match Action: historySearch:next.
Escape, Tab
History search
Accept selection Action: historySearch:accept.
Ctrl+C
History search
Cancel search Action: historySearch:cancel.
Enter
History search
Execute selected command Action: historySearch:execute.
Ctrl+S
History search
Cycle scope: session, project, everywhere Action: historySearch:cycleScope.
Background current task Action: task:background.
Ctrl+T
Theme
Toggle syntax highlighting Action: theme:toggleSyntaxHighlighting.
Escape
Help
Close help menu Action: help:dismiss.
Next tab Action: tabs:next.
Previous tab Action: tabs:previous.
Right
Attachments
Next attachment Action: attachments:next.
Left
Attachments
Previous attachment Action: attachments:previous.
Remove selected attachment Action: attachments:remove.
Down, Escape
Attachments
Exit attachment navigation Action: attachments:exit.
Escape
Diff
Close diff viewer; from the detail view, returns to the file list instead Action: diff:dismiss.
Left
Diff
Previous diff source Action: diff:previousSource.
Right
Diff
Next diff source Action: diff:nextSource.
Up, K
Diff
Previous file in the file list; scroll up one line in the detail view Action: diff:previousFile.
Next file in the file list; scroll down one line in the detail view Action: diff:nextFile.
Go back in diff viewer. Escape performs the back action via diff:dismiss. The previous default of Left in the detail view was removed in v2.1.203 Action: diff:back.
PageUp
Diff
Scroll up half a viewport Action: scroll:pageUp.
Scroll down half a viewport Action: scroll:pageDown.
Scroll up a full viewport Action: scroll:fullPageUp.
Space
Diff
Scroll down a full viewport Action: scroll:fullPageDown.
Jump to the top Action: scroll:top.
Jump to the bottom Action: scroll:bottom.
(unbound)
Diff panel
Open or close the diff panel Action: app:toggleReplTab.
Ctrl+X B
Diff panel
Cycle the panel's comparison base: this session, uncommitted, then branch Action: app:cycleDiffBase.
Scroll the panel's file list up when it overflows Action: app:diffFileListUp.
Scroll the panel's file list down when it overflows Action: app:diffFileListDown.
(unbound)
Diff panel
Show or hide test and generated files in the panel Action: app:toggleDiffNoiseFilter.
(unbound)
Diff panel
Expand or collapse the changes from before this session Action: app:toggleDiffPreSession.
Left
Model picker
Decrease effort level Action: modelPicker:decreaseEffort.
Right
Model picker
Increase effort level Action: modelPicker:increaseEffort.
s
Model picker
Apply highlighted model to this session only Action: modelPicker:thisSessionOnly.
Left
Effort slider
Move the slider to the next lower effort level. Requires v2.1.284 or later Action: effortSlider:decreaseEffort.
Right
Effort slider
Move the slider to the next higher effort level. Requires v2.1.284 or later Action: effortSlider:increaseEffort.
Tab
Effort slider
Turn ultracode on or off for this session, when the slider offers it. Requires v2.1.284 or later Action: effortSlider:toggleUltracode.
s
Effort slider
Apply the focused effort level to this session only. Requires v2.1.257 or later Action: effortSlider:thisSessionOnly.
Next option Action: select:next.
Previous option Action: select:previous.
PageUp
Select
Move up one page of options Action: select:pageUp.
PageDown
Select
Move down one page of options Action: select:pageDown.
Home
Select
First option Action: select:first.
End
Select
Last option Action: select:last.
Enter
Select
Accept selection Action: select:accept.
Escape
Select
Cancel selection Action: select:cancel.
Space
Plugin
Toggle plugin selection Action: plugin:toggle.
I
Plugin
Install selected plugins Action: plugin:install.
F
Plugin
Favorite the selected plugin so it sorts near the top of the Installed tab Action: plugin:favorite.
Ctrl+X Ctrl+A
Above-prompt
Collapse the band to a one-row hint, or expand it again Action: abovePrompt:toggle.
Ctrl+X Tab
Above-prompt
Move keyboard focus into the band, then to each open pane, and from the last pane back to the prompt Action: abovePrompt:focus.
Tab
Above-prompt
Focus the next control Action: abovePrompt:next.
Shift+Tab
Above-prompt
Focus the previous control Action: abovePrompt:previous.
Enter
Above-prompt
Press the focused button, submit the focused input field, or pick the highlighted option in a select Action: abovePrompt:press.
Escape
Above-prompt
Return keyboard focus to the prompt Action: abovePrompt:leave.
Down
Above-prompt
Highlight the next option in a focused select Action: abovePrompt:highlightNext.
Up
Above-prompt
Highlight the previous option in a focused select Action: abovePrompt:highlightPrevious.
Up
Pane
Scroll the pane up when it has more rows than it can show Action: pane:scrollUp.
Down
Pane
Scroll the pane down when it has more rows than it can show Action: pane:scrollDown.
PageUp
Pane
Scroll the pane up a page Action: pane:pageUp.
Scroll the pane down a page Action: pane:pageDown.
Home
Pane
Jump to the top of the pane Action: pane:top.
End
Pane
Jump to the bottom of the pane Action: pane:bottom.
Give the pane more room: width when it sits beside the transcript, height when it sits above the prompt Action: pane:grow.
Give the pane less room: width when it sits beside the transcript, height when it sits above the prompt Action: pane:shrink.
Close the pane Action: pane:close.
Show the next open pane Action: pane:next.
Show the previous open pane Action: pane:previous.
R
Settings
Retry loading usage data on error Action: settings:retry.
F
Settings
Send your session the /usage recommendations Claude Code can apply, when the /usage footer offers a fix. Requires v2.1.305 or later Action: settings:fixUsage.
Enter, Space
Settings
Change the selected setting or open its submenu Action: select:accept.
Escape
Settings
Close the panel. Changes are already saved Action: confirm:no.
Ctrl+S
Agents
Switch session grouping between state and directory Action: agents:switchView.
Ctrl+T
Agents
Pin or unpin the selected session Action: agents:togglePin.
Ctrl+F
Agents
Find sessions by name, with the n: filter. Requires v2.1.288 or later Action: agents:find.
Ctrl+R
Agents
Rename the selected session. Requires v2.1.288 or later Action: agents:rename.
Jump to the previous group header. Requires v2.1.288 or later Action: agents:previousGroup.
Jump to the next group header. Requires v2.1.288 or later Action: agents:nextGroup.
Space
Voice
Dictate a prompt. Hold or tap depending on /voice mode Action: voice:pushToTalk.
wheelup
Scroll
Scroll up one line. Mouse wheel scrolling triggers this action Action: scroll:lineUp.
wheeldown
Scroll
Scroll down one line. Mouse wheel scrolling triggers this action Action: scroll:lineDown.
PageUp
Scroll
Scroll up half the viewport height Action: scroll:pageUp.
PageDown
Scroll
Scroll down half the viewport height Action: scroll:pageDown.
Ctrl+Home
Scroll
Jump to the start of the conversation Action: scroll:top.
Ctrl+End
Scroll
Jump to the latest message and re-enable auto-follow Action: scroll:bottom.
(unbound)
Scroll
Scroll up half the viewport height. Same behavior as scroll:pageUp, provided for vi-style rebinds Action: scroll:halfPageUp.
(unbound)
Scroll
Scroll down half the viewport height. Same behavior as scroll:pageDown, provided for vi-style rebinds Action: scroll:halfPageDown.
(unbound)
Scroll
Scroll up the full viewport height Action: scroll:fullPageUp.
(unbound)
Scroll
Scroll down the full viewport height Action: scroll:fullPageDown.
Copy the selected text to the clipboard Action: selection:copy.
(unbound)
Scroll
Clear the active text selection. Requires v2.1.234 or later Action: selection:clear.
Extend the active selection one column left Action: selection:extendLeft.
Extend the active selection one column right Action: selection:extendRight.
Shift+Up
Scroll
Extend the active selection one row up. Scrolls the viewport when the selection reaches the top edge Action: selection:extendUp.
Extend the active selection one row down. Scrolls the viewport when the selection reaches the bottom edge Action: selection:extendDown.
Extend the active selection to the start of the line Action: selection:extendLineStart.
Shift+End
Scroll
Extend the active selection to the end of the line Action: 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.

More free Claude Code tools

All tools →