4 min read

Claude Code Keyboard Shortcuts Cheat Sheet

Essential keyboard shortcuts to speed up your Claude Code workflow.

Learning keyboard shortcuts makes Claude Code significantly faster to use. Here are the essential ones.

Basic Navigation

ShortcutAction
Ctrl+CCancel current operation
Ctrl+DExit Claude Code
Ctrl+LClear screen
Ctrl+RSearch command history
Up/DownNavigate through history

Input Editing

ShortcutAction
Ctrl+AMove to beginning of line
Ctrl+EMove to end of line
Ctrl+WDelete word before cursor
Ctrl+UDelete entire line
Ctrl+KDelete from cursor to end
Alt+BMove back one word
Alt+FMove forward one word

Multi-line Input

ShortcutAction
Shift+EnterNew line without sending
EnterSend message
Ctrl+EnterSend message (alternative)

Use Shift+Enter for multi-line prompts:

Create a function that:
- Takes a user object
- Validates the email
- Returns a formatted string

Response Control

ShortcutAction
Ctrl+CStop generation
SpacePause/resume scrolling
qStop scrolling and return to input

Permission Prompts

When Claude asks for permission:

KeyAction
yYes, allow once
nNo, deny
aAlways allow this type
EnterAccept default (usually yes)

Vim Mode

Enable vim mode for vim-style editing:

claude config set vim-mode true

Then you get:

ModeShortcutAction
NormaliEnter insert mode
NormalaEnter insert mode after cursor
NormalddDelete line
NormalyyYank (copy) line
NormalpPaste
Normal/Search
InsertEscReturn to normal mode
Normalh/j/k/lNavigate
Normalw/bWord forward/back
Normal0/$Line start/end

Quick Commands

Type these at the prompt:

CommandAction
/helpShow all commands
/clearClear conversation
/compactReduce context size
/model sonnetSwitch to Sonnet
/model haikuSwitch to Haiku
/model opusSwitch to Opus
/exitExit Claude Code

Session Management

CommandAction
/session listShow all sessions
/session saveSave current session
/session load <name>Load a session

File Operations

CommandAction
/read <file>Read a file
/edit <file>Focus on editing a file

Tips for Faster Workflow

1. Use history navigation

Press Up to recall previous prompts. Edit and resend.

2. Abbreviate when possible

Claude understands context:

# Instead of this
Read the file located at src/components/Button.tsx

# Just type
Read src/components/Button.tsx

3. Use tab completion

Tab completes file paths (in most terminals):

Read src/com[TAB] → src/components/

4. Chain commands with semicolons

Read package.json; show me the dependencies

5. Use multi-line for complex prompts

[Shift+Enter]
Create a function that:
[Shift+Enter]
1. Fetches user data
[Shift+Enter]
2. Validates the response
[Shift+Enter]
3. Caches the result
[Enter]

Customizing Shortcuts

You can customize shortcuts in settings:

claude config set shortcuts.clear "Ctrl+K"
claude config set shortcuts.exit "Ctrl+Q"

Platform-Specific Notes

macOS

  • Use Cmd instead of Ctrl for some operations
  • Cmd+K clears terminal in most terminal apps

Windows

  • All Ctrl shortcuts work as expected
  • Some terminals may capture shortcuts differently

Linux

  • Standard terminal shortcuts apply
  • May vary by terminal emulator

Quick Reference Card

Print this for your desk:

ESSENTIAL
─────────────────────────────
Ctrl+C      Cancel/Stop
Ctrl+L      Clear screen
Up/Down     History
Shift+Enter Multi-line

EDITING
─────────────────────────────
Ctrl+A      Start of line
Ctrl+E      End of line
Ctrl+W      Delete word
Ctrl+U      Delete line

COMMANDS
─────────────────────────────
/help       Show help
/clear      Clear chat
/compact    Save tokens
/model X    Switch model

PERMISSIONS
─────────────────────────────
y           Allow once
n           Deny
a           Always allow

Practice Exercise

Try this sequence to practice:

  1. Start Claude Code: claude
  2. Type a prompt, press Up to see history
  3. Use Ctrl+A to go to start, Ctrl+E to end
  4. Try multi-line with Shift+Enter
  5. Use /clear to reset
  6. Try /model haiku then /model sonnet
  7. Exit with Ctrl+D or /exit

Within a few days, these become muscle memory.