Claude Code Keyboard Shortcuts

Quick reference for macOS Terminal

Input Control

Shortcut Action
Ctrl + C Cancel current input or stop generation
Ctrl + U Clear entire line
Ctrl + K Delete from cursor to end of line
Esc Esc Rewind conversation to previous point

Navigation

Shortcut Action
/ Navigate command history
Ctrl + R Search command history
Alt + B Move back one word
Alt + F Move forward one word

Submitting Messages

Shortcut Action
Enter Submit message
Option + Enter New line (multiline input)
\ + Enter New line (works in all terminals)
Ctrl + J Line feed (alternative multiline)

Text Editing

Shortcut Action
Ctrl + Y Paste deleted text (from Ctrl+K or Ctrl+U)
Alt + Y Cycle through paste history

Session Control

Shortcut Action
Ctrl + L Clear screen (keeps conversation)
Ctrl + D Exit Claude Code
Shift + Tab Toggle permission modes
Option + P Switch model without clearing input
Option + T Toggle extended thinking mode
? Show all shortcuts

Quick Prefixes

Prefix Action
/ Slash command (e.g., /help, /memory)
! Run bash directly (e.g., !ls, !git status)
@ File path autocomplete
macOS Terminal Configuration

For Option/Alt shortcuts to work in Terminal.app, go to Settings → Profiles → Keyboard and check "Use Option as Meta Key".

In iTerm2: Settings → Profiles → Keys → Set Left/Right Option key to "Esc+".

← Back to Resources