Skip to main content

Keyboard shortcuts

Master the keyboard shortcuts for efficient Claude Code usage.

i

macOS Terminal Setup

For Alt/Option key shortcuts to work on macOS, configure your terminal:

iTerm2

Preferences → Profiles → Keys → Set Left/Right Option key to Esc+

Terminal.app

Preferences → Profiles → Keyboard → Check Use Option as Meta Key

Pro tip: Run /terminal-setup inside Claude Code to automatically configure Shift+Enter for multiline input.

General Controls

ShortcutDescriptionContext
Ctrl+CCancel current input or generationStandard interrupt
Ctrl+DExit Claude Code sessionEOF signal
Ctrl+LClear prompt inputKeeps conversation history
Ctrl+OToggle transcript viewerShows detailed tool usage
Ctrl+RReverse search command historyInteractive search
Ctrl+BBackground running tasksContinue working while tasks run
Ctrl+TToggle task listShow/hide terminal status
Ctrl+G or Ctrl+X Ctrl+EOpen in text editorEdit your prompt
Esc + EscRewind or summarizeRestore to previous point
✏️

Text Editing

ShortcutDescriptionNote
Ctrl+KDelete to end of lineStores for pasting
Ctrl+UDelete from cursor to line startStores for pasting
Ctrl+YPaste deleted textYank previous deletion
Alt+YCycle paste historyAfter Ctrl+Y
Alt+BMove cursor back one wordRequires Option as Meta on Mac
Alt+FMove cursor forward one wordRequires Option as Meta on Mac
Alt+MToggle permission modesCycle default/acceptEdits/plan
🧭

Navigation

ShortcutDescriptionNote
Up/Down arrowsNavigate command historyRecall previous inputs
Left/Right arrowsCycle through dialog tabsPermission dialogs
Shift+Tab or Alt+MCycle permission modesdefault → acceptEdits → plan
Option+P or Alt+PSwitch modelWithout clearing prompt
Option+T or Alt+TToggle extended thinkingRequires Option as Meta on Mac
Option+O or Alt+OToggle fast modeEnable/disable fast mode
📝

Multiline Input

ShortcutDescriptionCompatibility
\ + EnterQuick escape for multilineWorks in all terminals
Option+Enter (macOS)New lineDefault on macOS
Shift+EnterNew lineWorks in iTerm2, WezTerm, Ghostty, Kitty
Ctrl+JNew lineLine feed character
⌨️

Quick Commands

PrefixDescriptionUsage
/ at startCommand or skillType / to see all
! at startBash modeRun commands directly
@File path mentionTriggers autocomplete
Space (hold)Push-to-talk dictationRequires voice enabled
📌

Vim Mode

Enable vim-style editing via /config → Editor mode

KeyDescriptionMode
EscEnter NORMAL modeFrom INSERT mode
iInsert before cursorNORMAL → INSERT
AInsert at end of lineFrom NORMAL mode
ddDelete lineIn NORMAL mode
yyYank (copy) lineIn NORMAL mode
pPaste after cursorIn NORMAL mode
>>Indent lineIn NORMAL mode
ggBeginning of inputIn NORMAL mode
GEnd of inputIn NORMAL mode
👁️

Transcript Viewer

Press Ctrl+O to open the transcript viewer, then use:

ShortcutDescriptionContext
Ctrl+EToggle show all contentIn transcript viewer
q, Ctrl+C, or EscExit transcript viewIn transcript viewer
fFix any issuesIn /doctor output

Most Used Shortcuts

Ctrl+CCancel
Ctrl+DExit
Ctrl+OTranscript
Ctrl+BBackground
Ctrl+RSearch
/Commands