Claude Code CLI Keyboard Shortcuts
Build and debug code with an AI agent in your terminal.
⌘K
63 shortcuts / 7 sections
Session and modes
22Interrupt operation or clear input
⌃CControl CWhen idle, a second press exits
Stop all background subagents
⌃XControl Xthen⌃KControl KRepeat the sequence within 3 seconds to confirm
Exit session
⌃DControl DEmpty prompt: press twice within 800ms
Edit prompt in external editor
⌃GControl G
Edit prompt in external editor
⌃XControl Xthen⌃EControl E
Redraw screen
⌃LControl L
Toggle transcript viewer
⌃OControl O
Search command history
⌃RControl R
Paste image from clipboard
⌃VControl V
Background running tasks
⌃BControl BPress twice in tmux
Toggle task checklist
⌃TControl T
Stash or restore prompt
⌃SControl S
Interrupt response or close dialog
⎋Escape
Clear draft or open rewind menu
⎋Escapethen⎋EscapeRewind opens when the prompt is empty
Send queued messages now
⌃↩Control Enterv2.1.275+; terminal must report extended keys
Send queued messages now
⌃XControl Xthen⌃SControl SRequires v2.1.275 or later
Cycle permission modes
⇧⇥Shift Tab
Switch model
⌥POption PRequires Option as Meta in the terminal
Toggle extended thinking
⌥TOption TFor models that support disabling thinking
Toggle fast mode
⌥OOption O
Suspend Claude Code
⌃ZControl ZRun fg in the shell to resume
Paste image from clipboard
⌘VCommand ViTerm2 only
Input and dialogs
8Move up or recall previous input
↑Up ArrowHistory is reached at the first visual row
Move up or recall previous input
⌃PControl PHistory is reached at the first visual row
Move down or recall next input
↓Down ArrowHistory is reached at the last visual row
Move down or recall next input
⌃NControl NHistory is reached at the last visual row
Previous dialog tab
←Left ArrowWhen the tab row has focus
Next dialog tab
→Right ArrowWhen the tab row has focus
Accept autocomplete suggestion
⇥TabWhen suggestions are visible
Toggle permission answer comment
⇥TabWhen Yes or No is focused
Text editing
13Move to line start
⌃AControl A
Move to line end
⌃EControl E
Delete to line end
⌃KControl K
Delete to line start
⌃UControl U
Delete to previous whitespace
⌃WControl W
Paste deleted text
⌃YControl Y
Cycle paste history
⌥YOption YAfter Ctrl+Y; set Option as Meta on macOS
Move back one word
⌥BOption BRequires Option as Meta in the terminal
Move to word end
⌥FOption FRequires Option as Meta in the terminal
Delete to word end
⌥DOption DRequires Option as Meta in the terminal
Undo last input edit
⌃⇧-Control Shift -
Delete to line start
⌘⌫Command BackspaceiTerm2 and Terminal.app
Delete previous word
⌥⌫Option Backspace
Multiline input
4Insert new line
\\then↩EnterType a backslash, then press Enter
Insert new line
⌃JControl J
Insert new line
⇧↩Shift EnterRequires a compatible or configured terminal
Insert new line
⌥↩Option EnterRequires Option as Meta in the terminal
Quick commands
5Open command or skill menu
//At the start of the prompt
Enter shell mode
⇧1Shift 1Type ! at the start of the prompt
Mention a file path
⇧2Shift 2Type @ in the prompt
Enter emoji shortcode
⇧;Shift ;Type :name:; requires v2.1.217 or later
Toggle shortcut help
⇧/Shift /Type ? when the prompt is empty
Transcript viewer
9Toggle transcript shortcut help
⇧/Shift /Fullscreen renderer only
Jump to previous user prompt
⇧[Shift [Fullscreen renderer only
Jump to next user prompt
⇧]Shift ]Fullscreen renderer only
Toggle all transcript content
⌃EControl EClassic renderer only
Write conversation to native scrollback
[[Fullscreen renderer only
Open conversation in external editor
VVFullscreen renderer only
Exit transcript viewer
QQ
Exit transcript viewer
⌃CControl C
Exit transcript viewer
⎋Escape
Theme and voice
2Toggle code syntax highlighting
⌃TControl TInside the /theme picker only
Voice dictation
Enable /voice, then hold Space or use /voice tap