Claude Code runs in a terminal, so this page gives one set of keys for every system and shows the macOS variant where the documentation prints one, as in Option + P / Alt + P for switching models. It covers the prompt, dialogs, the transcript viewer, fullscreen rendering, agent view and the vim editor mode; slash commands and CLI flags are left out. On macOS most Alt shortcuts need Option set as Meta in the terminal.
259 shortcuts in 20 sections.Checked row by row against Claude Code Docs on .Edited by Jay.
Session controls 14
Action
Shortcut
Interrupt or clear the promptStops a running operation; when idle, one press empties the prompt and a second quits.
Ctrl+C
Exit the sessionThe first press only shows a hint; press again within 800 ms to quit.
Ctrl+D
Stop the response or close a dialogWork done so far is kept and queued messages go out next; on a permission prompt it declines.
Esc
Clear the draft or rewindWith text typed it clears and saves the draft; on an empty prompt it opens the rewind menu.
EscthenEsc
Cycle permission modesSteps through default, acceptEdits and plan; Alt + M replaces it on Windows runtimes without VT input mode.
Shift+TaborAlt+M
Switch modelOption + P on macOS, Alt + P on Windows and Linux; the text in your prompt stays.
Option+PorAlt+P
Toggle extended thinkingDoes nothing on models that always think; on macOS it works without setting Option as Meta.
Option+TorAlt+T
Toggle fast modeOption + O on macOS, Alt + O on Windows and Linux.
Option+OorAlt+O
Toggle transcript viewerShows tool calls in detail, with a timestamp and the model name on every assistant message.
Ctrl+O
Toggle the task checklistShows or hides Claude's to-do list in the status area; running shells and subagents are under /tasks.
Ctrl+T
Redraw the screenRepaints a garbled or half-blank display without losing the prompt text or the conversation.
Ctrl+L
Redraw from a Mac terminalOnly where the terminal forwards the key; iTerm2 and Terminal.app wipe their own display and Claude Code repaints it.
Cmd+K
Suspend Claude CodeUnix only: the process drops to your shell and fg brings it back.
Ctrl+Z
Cancel automatic continueWhile the usage-limit wait lines show; Esc needs an empty prompt.
EscorCtrl+C
Prompt input 19
Action
Shortcut
Send the promptWhile Claude is working, the message is queued instead of interrupting the turn.
Enter
New line with a backslashType a backslash and then press Enter; this works in every terminal.
\thenEnter
New line in any terminalInserts a line break without sending and needs no terminal setup.
Ctrl+J
Insert a new lineNative in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal; other terminals need setup.
Shift+Enter
New line on macOSNeeds Option set as Meta in the macOS terminal.
Option+Enter
Accept autocomplete suggestionInserts the highlighted suggestion while the list is showing, for example a file path after @.
Tab
Dismiss autocomplete menu
Esc
Previous autocomplete suggestion
Up
Next autocomplete suggestion
Down
Cursor up or previous promptMoves within a multi-row prompt first; from the first row it recalls the previous history entry.
UporCtrl+P
Cursor down or next promptMoves within a multi-row prompt first; from the last row it steps forward through history.
DownorCtrl+N
Accept prompt suggestionPuts the suggested prompt into the input; Enter then submits it.
TaborRight
Paste image from clipboardCmd + V is for iTerm2 and Alt + V for Windows and WSL; an [Image #N] chip marks the spot.
Ctrl+VorCmd+VorAlt+V
Open prompt in text editorEdits the prompt in your default editor; the second form is the readline-native binding.
Ctrl+GorCtrl+XthenCtrl+E
Stash or restore the promptSets the typed text aside and empties the prompt; pressed again on an empty prompt, it brings the text back.
Ctrl+S
Dictate by voiceNeeds voice dictation enabled; hold to record, or tap after running /voice tap.
Space
Queue the messageSends the draft so that it waits for the current turn to end instead of interrupting.
Ctrl+XthenEnter
Send queued messages nowQueued messages and the draft go out at once; terminals without extended keys need the second form.
Ctrl+EnterorCtrl+XthenCtrl+S
Take back queued messagesWith the cursor on the top row, queued entries return to the input for editing.
Up
Editing text 13
On macOS, Alt + B, Alt + F, Alt + D, Alt + Y and Alt + P reach Claude Code only after the terminal is set to send Option as Meta.
Action
Shortcut
Go to start of lineIn a multiline prompt it stays on the same logical line.
Ctrl+A
Go to end of lineStays on the current logical line when the prompt has several lines.
Ctrl+E
Move back one wordA word is a run of letters and digits; on macOS the terminal must send Option as Meta.
Alt+B
Move forward one wordLands at the end of the current word, or of the next one when between words.
Alt+F
Cut to end of lineThe removed text is stored and can be pasted back with Ctrl + Y.
Ctrl+K
Cut back to line startRepeat it to clear across lines; macOS terminals such as iTerm2 map Cmd + Backspace to it.
Ctrl+U
Cut back to previous whitespaceOne press takes out a whole path or a --flag=value token.
Ctrl+W
Delete previous wordOption + Delete on macOS, Ctrl + Backspace on Windows; punctuation such as . and / ends a word.
Option+DeleteorCtrl+Backspace
Cut to end of wordRemoves up to the end of the current or next word and keeps it for Ctrl + Y.
Alt+D
Delete character after cursorApplies only while the prompt has text; on an empty prompt the same key exits.
Ctrl+D
Paste deleted textBrings back whatever Ctrl + K, Ctrl + U or Ctrl + W last removed.
Ctrl+Y
Cycle paste historyPress right after Ctrl + Y to step through earlier deletions; needs Option as Meta on macOS.
Alt+Y
Undo last input editBrings back the earlier prompt text together with its cursor position.
Ctrl+_orCtrl+Shift+-
Typed prefixes 5
Action
Shortcut
Run a command or skillAt the start of the prompt it lists built-in commands, skills and plugin commands; letters filter the list.
/
Enter shell modeThe line runs in your shell and its output joins the conversation.
!
Mention a file pathOpens file path autocomplete; press Tab to accept a match.
@
Insert an emoji shortcodeA full :name: inserts the emoji; two or more characters open suggestions.
:
Toggle shortcut help panelOnly on an empty prompt; with text already typed it just inserts the character.
?
History search 9
Action
Shortcut
Search prompt historyThe classic renderer searches inline across all projects; fullscreen rendering opens a search dialog.
Ctrl+R
Go to an older matchPressed again during an inline search, it moves to the next older match.
Ctrl+R
Accept match and keep editingInline search: the match lands in the prompt without being run.
TaborEsc
Run the matched promptInline search: accepts the match and submits it straight away.
Enter
Cancel history searchPuts back what you had typed before the search started.
Ctrl+C
Cancel an empty searchWorks only when the search field has no text.
Backspace
Move through matchesIn the fullscreen search dialog, after typing a filter.
UporDown
Cycle search scopeFullscreen dialog only: switches between this session, this project and all projects.
Ctrl+S
Place match in the promptFullscreen search dialog; there Esc cancels instead of accepting.
EnterorTab
Transcript viewer 12
Action
Shortcut
Show transcript shortcutsOpens the key help panel inside the viewer; needs fullscreen rendering.
?
Jump between user promptsPrevious or next prompt, like a vim paragraph motion; fullscreen rendering only.
{or}
Search the transcriptFullscreen rendering: Enter keeps the match, Esc cancels and returns to where you were.
/
Next or previous matchStill works once the search bar has been closed.
norN
Scroll one linePart of the less-style navigation that fullscreen rendering adds to transcript mode.
jorkorUporDown
Go to top or bottom
gorGorHomeorEnd
Scroll half a page
Ctrl+UorCtrl+D
Scroll a full page
Ctrl+BorCtrl+ForSpaceorb
Toggle show all contentClassic renderer only; fullscreen rendering has no such toggle.
Ctrl+E
Write conversation to scrollbackPuts the whole conversation into the terminal's own scrollback so native search can reach it.
[
Open conversation in editorUses a temp file and the editor named in $VISUAL or $EDITOR; fullscreen rendering only.
v
Exit transcript viewEach of the three keys is rebindable through the transcript:exit action.
qorCtrl+CorEsc
Fullscreen scrolling and selection 18
On a MacBook keyboard, Fn with the arrow keys sends Page Up, Page Down, Home and End. Ctrl + Fn + Right does not reach Claude Code on macOS, so jumping to the bottom has no working chord there by default.
Action
Shortcut
Scroll half a screenScrolls the conversation inside the app when fullscreen rendering is on.
Page UporPage Down
Go to start of conversation
Ctrl+Home
Go to latest messageAlso switches auto-follow back on.
Ctrl+End
Scroll with the mouse wheel
Scroll
Select textSelected text is copied on mouse release unless Copy on select is turned off.
Drag
Select a wordFollows iTerm2 word boundaries, so a path or a URL is picked up whole.
Double-click
Select the line
Triple-click
Extend selection left
Shift+Left
Extend selection right
Shift+Right
Extend selection upThe view scrolls with it at the top edge.
Shift+Up
Extend selection downThe view scrolls with it at the bottom edge.
Shift+Down
Extend selection to line start
Shift+Home
Extend selection to line end
Shift+End
Copy selected textNeeded when Copy on select is off; Cmd + C requires a terminal with the kitty keyboard protocol.
Ctrl+Shift+CorCmd+C
Copy the active selectionWhile text is selected in fullscreen rendering it copies rather than interrupting.
Ctrl+C
Place cursor in the prompt
Click
Expand a collapsed tool resultClick again to collapse; the tool call and its result open together.
Click
Open a link or file pathCmd on macOS, Ctrl on Linux and Windows; a plain click does not open links.
Cmd+ClickorCtrl+Click
Permission prompts and dialogs 20
Letter keys from the keybindings reference (j, k, s, i, f, r, g, b) are pressed without Shift: Claude Code reads key names case-insensitively and a capital is written with Shift, as in Shift + G.
Action
Shortcut
Confirm the dialogDialogs use the same action to accept even when they ask no yes-or-no question.
Enter
Decline the actionOn a permission prompt this answers No without a comment.
Esc
Previous dialog option
Up
Next dialog option
Down
Toggle dialog selection
Space
Comment on a permission answerWith Yes or No focused it opens a comment field; a second press closes the field.
Tab
Allow for the whole sessionOn file permission prompts that offer the option; with a comment field open it closes the field.
Shift+Tab
Toggle fast mode in /fast dialog
Tab
Close the dialogEither key pressed twice closes most dialogs rather than quitting; the hint after the first press says which.
Ctrl+CthenCtrl+CorCtrl+DthenCtrl+D
Next dialog tabSwitches tabs while the tab row has focus; in /help and /sandbox it also works from the content.
TaborRight
Previous dialog tab
Shift+TaborLeft
Move between tab row and contentA list inside the tab answers keys only while it has focus.
UporDown
Next list optionApplies to generic lists such as the /model picker and the rewind menu.
DownorjorCtrl+N
Previous list option
UporkorCtrl+P
Page up through options
Page Up
Page down through options
Page Down
First list option
Home
Last list option
End
Accept list selection
Enter
Cancel list selection
Esc
Attachments and footer items 10
Action
Shortcut
Next attachmentApplies to image attachments shown in select dialogs.
Right
Previous attachment
Left
Remove selected attachment
BackspaceorDelete
Leave attachment navigation
DownorEsc
Next footer itemThe footer holds the task, team, diff and artifact indicators.
Right
Previous footer item
Left
Move up in footerAt the top it deselects the footer item.
Up
Move down in footer
Down
Open selected footer itemOpens it even when Enter is rebound in the Chat context.
Enter
Clear footer selectionDeselects the row, for example in the subagent panel, instead of interrupting Claude.
Esc
Pickers and settings panels 15
Action
Shortcut
Lower effort in model picker
Left
Raise effort in model picker
Right
Use model for this session onlyActs on the model highlighted in the picker.
s
Lower effort on the sliderThe slider opens when /effort is run with no arguments; needs v2.1.284 or later.
Left
Raise effort on the slider
Right
Toggle ultracodeOnly when the /effort slider offers ultracode; the switch covers this session.
Tab
Use effort for this session only
s
Toggle plugin selection
Space
Install selected plugins
i
Favorite the selected pluginFavorites are listed close to the top of the Installed tab.
f
Search settingsPuts the settings panel into search mode.
/
Change the selected settingOpens a submenu when the setting has one.
EnterorSpace
Retry loading usage dataAvailable after the usage data failed to load.
r
Close the settings panelEach change is saved the moment you make it, so closing loses nothing.
Esc
Toggle syntax highlightingOnly inside the /theme picker; decides whether code in responses is coloured.
Ctrl+T
Background tasks and shell mode 5
A binding written with a comma, such as Ctrl + X, Ctrl + K, is two keystrokes: press the second within 3 seconds of the first or Claude Code cancels the chord.
Action
Shortcut
Background the running taskMoves a running Bash command or agent to the background; tmux users press Ctrl + B twice.
Ctrl+BorCtrl+XthenCtrl+B
Stop all background subagentsPress twice within 3 seconds to confirm; it also turns off artifact auto-replies for the session.
Ctrl+XthenCtrl+K
Background session and open agent viewOnly on an empty prompt; the session keeps running, and in an attached session the same press detaches.
Left
Leave shell modeWorks on an empty prompt after the ! prefix switched the input to shell mode.
EscorBackspaceorCtrl+U
Complete a shell commandIn shell mode, finishes a partial command from earlier ! commands in the project.
Tab
Reviewing diffs 8
Action
Shortcut
Scroll file list upDiff panel in fullscreen rendering, once the changed-file list overflows.
Alt+UporCtrl+Up
Scroll file list down
Alt+DownorCtrl+Down
Cycle the comparison baseGoes from this session to all uncommitted changes, then to everything since the branch split.
Ctrl+XthenB
Select a changed fileDiff dialog of the classic renderer; inside an open diff the same keys scroll.
UporDown
Open the file's diff
Enter
Scroll an open diff
Page UporPage Down
Back to list or close dialog
Esc
Focus the source pickerThen pick Current or a turn view; inside a file's diff, Tab reaches the ask button instead.
Tab
Earlier diff viewer 11
Action
Shortcut
Previous diff sourceThis viewer opens outside fullscreen rendering only after the cc-plugin-diff mod is disabled.
Left
Next diff source
Right
Previous file or line upMoves through the file list, or scrolls one line in the detail view.
Upork
Next file or line down
Downorj
Half viewport up
Page Up
Half viewport down
Page Down
Full viewport up
Shift+Spaceorb
Full viewport down
Space
Top of the diff
gorHome
Bottom of the diff
Shift+GorEnd
Close viewer or return to listFrom the detail view it goes back to the file list first.
Esc
Side question overlay 9
Action
Shortcut
Dismiss the answerCloses the /btw overlay; running /btw with no question reopens it.
SpaceorEnterorEsc
Scroll the answer
UporDown
Show older side answersThe bracket is for terminals that do not report Shift with arrow keys; needs v2.1.257 or later.
Shift+Leftor[
Return toward current answer
Shift+Rightor]
Cycle through side answers
TaborShift+Tab
Copy answer as MarkdownCopies the raw source text, which mouse selection of the wrapped terminal output would not give.
c
Fork into a subagentThe fork inherits the conversation plus this exchange and has full tool access; local sessions only.
f
Clear earlier side questions
x
Detach to agent viewOnly in an attached background session; the side question keeps running.
Left
Agent view 22
Action
Shortcut
Move between rows
UporDown
Move a screenful of rows
Page UporPage Down
First or last row
HomeorEnd
Attach or submit inputAttaches to the selected session, or sends the input's text when it is not a filter.
Enter
Attach to selected session
Right
Attach to session 1 to 9Counts within the focused session's directory.
Alt+1-9
Toggle the peek panel
Space
Browse subagents or apply suggestionOn an empty input it lists all subagents; otherwise it applies the highlighted suggestion.
Tab
New line in dispatch input
Shift+Enter
New line in dispatch input
Ctrl+J
Dispatch and attach at onceOnly in terminals where the ? overlay lists the key.
Ctrl+Enter
Edit dispatch prompt in editorOpens $VISUAL or $EDITOR; it follows the chat:externalEditor binding.
Ctrl+G
Switch session groupingGroups sessions by state or by directory.
Ctrl+S
Pin or unpin session
Ctrl+T
Find sessions by name
Ctrl+F
Rename selected session
Ctrl+R
Jump between group headersCtrl with the same arrows is bound as well by default.
Alt+UporAlt+Down
Reorder selected session
Shift+UporShift+Down
Stop or delete sessionThe first press stops the session; a second within two seconds deletes it.
Ctrl+X
Close peek, clear input or exitAfter backgrounding a session with the Left key, the final press returns to that conversation.
Esc
Clear input or exitOne press empties the input; two presses leave agent view.
Ctrl+C
Show agent view shortcuts
?
Vim mode switching 9
Action
Shortcut
Enter NORMAL modeFrom INSERT or VISUAL; with vim mode on, Esc no longer cancels the input.
EscorCtrl+[
Insert before cursor
i
Insert at line start
I
Insert after cursor
a
Insert at line end
A
Open line below
o
Open line above
O
Character-wise selectionStarts VISUAL mode; motions then extend the selection.
v
Line-wise selection
V
Vim normal mode navigation 19
Action
Shortcut
Cursor left, down, up, right
horjorkorl
Move one character right
Space
Next word
w
End of word
e
Previous word
b
Start of line
0
First non-blank character
^
End of line
$
Start of input
gg
Start of last line
G
Find character forwardThe cursor lands on the next occurrence of the typed character.
f{char}
Find character backward
F{char}
Jump before next characterStops one position short of the match.
t{char}
Jump after previous character
T{char}
Repeat last character jump
;
Repeat character jump in reverse
,
Browse prompt historyOnly when the cursor sits at the start or end of the input and has nowhere left to go.
jorkorUporDown
Open history searchActs like Ctrl + R; the empty search shows a hint for reaching the command menu instead.
/
Show the help menu
?
Vim normal mode editing 23
Action
Shortcut
Delete character
x
Replace character under cursor
r{char}
Substitute characterRemoves the character under the cursor and switches to INSERT mode; needs v2.1.211 or later.
s
Substitute lineEmpties the line and switches to INSERT mode; needs v2.1.211 or later.
S
Delete line
dd
Delete to line end
D
Delete by word motionThe second letter is the motion: w for a word, e to its end, b backward.
dwordeordb
Delete through or up to characterdf removes the matched character too, dt stops just before it.
df{char}ordt{char}
Delete line and its neighbourdj takes the line below as well, dk the line above.
djordk
Delete to first or last line
dgg / dG
Operate back to line startDeletes, changes or yanks from the cursor to the line start; needs v2.1.281 or later.
d0orc0ory0
Change line
cc
Change to line end
C
Change by word motion
cworceorcb
Yank lineYank means copy; both forms take the whole line.
yyorY
Yank by word motion
yworyeoryb
Paste after cursor
p
Paste before cursor
P
Indent line
>>
Dedent line
<<
Join lines
J
Undo last change
u
Repeat last change
.
Vim text objects 7
Action
Shortcut
Inner or around wordUsed after an operator such as d, c or y.
iworaw
Inner or around WORDA WORD is delimited by whitespace only.
iWoraW
Inside or around double quotes
i"ora"
Inside or around single quotes
i'ora'
Inside or around parentheses
i(ora(
Inside or around brackets
i[ora[
Inside or around braces
i{ora{
Vim visual mode 11
Action
Shortcut
Delete selection
dorx
Yank selection
y
Change selection
cors
Replace selection from register
p
Replace selected charactersEvery character in the selection becomes the typed one.
r{char}
Change case of selection~ toggles case, u makes lowercase and U uppercase.
~oruorU
Indent or dedent the selection
>or<
Join selected lines
J
Swap cursor and anchor
o
Select a text objectAny text object from the NORMAL mode list selects that span here.
iworaw
Switch selection type or exitBlock-wise selection with Ctrl + V is not supported.
vorV
No row on this page matches that filter.
Notes
Keys that depend on the terminal
Claude Code reads keys through the terminal, so a few bindings depend on what the terminal sends. On macOS, Alt + B, Alt + F, Alt + D, Alt + Y and the model switch need Option configured as Meta, while Option + T works without it. Shift + Enter is native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal; Ctrl + J and a backslash followed by Enter insert a new line in any terminal. Inside tmux, Ctrl + B is the prefix key, so press it twice to background a task.
Classic renderer and fullscreen rendering
Several keys change with the renderer. In the classic renderer Ctrl + R searches history inline and Tab or Esc accepts a match; in fullscreen rendering the same key opens a dialog where Esc cancels and Ctrl + S cycles the scope. The transcript viewer opened with Ctrl + O gains search and less-style scrolling in fullscreen rendering, while Ctrl + E for showing all content exists only in the classic renderer. The page keys, Ctrl + Home, Ctrl + End and mouse selection belong to fullscreen rendering.
Rebinding and reserved keys
Running /keybindings opens ~/.claude/keybindings.json, where bindings are grouped by context such as Chat, Confirmation or Transcript, and changes apply without a restart. Ctrl + C and Ctrl + D are hardcoded and cannot be rebound. The text editing shortcuts have no actions in that file, and vim keys are not remappable there either; the one vim remap is a two-key INSERT sequence mapped to Escape through the vimInsertModeRemaps setting.
Questions
Where are the slash commands like /compact and /clear?
On the Claude Code prompts reference page, which lists the full in-session command set. This page covers keyboard shortcuts, typed prefixes and the vim editor mode only.
How do I type a new line in Claude Code without sending the prompt?
Ctrl + J works in any terminal without configuration, as does a backslash followed by Enter. Shift + Enter is native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal, and Option + Enter works on macOS once Option is set as Meta.
Why do the Alt shortcuts not work in Claude Code on macOS?
The terminal has to send Option as Meta before Alt + B, Alt + F, Alt + D, Alt + Y and Alt + P reach Claude Code; the terminal configuration page of the Claude Code docs gives the setting for each terminal. Toggling extended thinking with Option + T works without that setting.
How do I revert a change Claude Code made?
Press Esc, Esc on an empty prompt to open the rewind menu, which restores or summarizes code and conversation from an earlier point. With text in the prompt the same keys clear the draft instead.
Which key switches Claude Code between permission modes?
Shift + Tab cycles through default, acceptEdits and plan, then bypassPermissions and auto when those are available. On Windows runtimes that do not enable VT input mode the default is Alt + M.
Can Claude Code's keyboard shortcuts be changed?
Yes. /keybindings creates or opens ~/.claude/keybindings.json, where each context maps keystrokes to actions and null unbinds a default. Ctrl + C and Ctrl + D stay fixed, and the text editing and vim keys are not covered by that file.
Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.
9 rows from the earlier version of this page were removed in that check: duplicates, and bindings the documentation does not list or lists differently.
Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.