Claude Code Keyboard Shortcuts — The Complete List

There’s a certain point with any tool where you stop thinking about how to use it and just use it. Keyboard shortcuts are what get you there with Claude Code. Instead of hunting through menus or retyping commands, you’re moving fast — switching modes, accepting changes, canceling tasks — without breaking your flow. This is the complete reference.

This is part of our complete How Claude Code Works — A Beginner’s Deep Dive.


TL;DR

  • Shift+Tab cycles through Normal, Plan, and Auto modes
  • Escape cancels the current Claude Code operation
  • Ctrl+C exits Claude Code entirely
  • Up/Down arrows scroll through your prompt history
  • Most actions in Claude Code have both a keyboard shortcut and a slash command equivalent

Before You Start: How Shortcuts Work in Claude Code

Claude Code runs in your terminal (or in your IDE panel if you’re using the VS Code or JetBrains extension). The shortcuts here are for the terminal interface. If you’re using an IDE extension, some shortcuts may differ — check How to Use Claude Code in VS Code or How to Use Claude Code in JetBrains IDEs for IDE-specific shortcuts.

The shortcuts below use standard notation:

  • Ctrl = Control key (Windows/Linux) or Control key (Mac — not Command)
  • Shift = Shift key
  • Tab = Tab key
  • Esc = Escape key

Mode Shortcuts

These shortcuts control which mode Claude Code is operating in. Understanding the modes first will make these more meaningful — see Claude Code Modes Explained.

Shortcut Action
`Shift+Tab` Cycle through modes: Normal → Plan → Auto → Normal
`/plan` Switch directly to Plan Mode (slash command)
`/auto` Switch directly to Auto Mode (slash command)
`/normal` Return to Normal Mode (slash command)

# Using Shift+Tab to switch modes
# Press once: switches from Normal to Plan Mode
# Press again: switches from Plan to Auto Mode
# Press again: returns to Normal Mode
Shift+Tab

Prompt Input Shortcuts

These shortcuts work while you’re typing your prompt — before you’ve sent it to Claude Code.

Shortcut Action
`Enter` Send your prompt to Claude Code
`Shift+Enter` Add a new line in your prompt without sending it
`Up Arrow` Load your previous prompt (prompt history)
`Down Arrow` Move forward through prompt history
`Ctrl+U` Clear the current prompt (delete everything you’ve typed)
`Ctrl+W` Delete the last word you typed
`Ctrl+A` Move cursor to the beginning of the prompt
`Ctrl+E` Move cursor to the end of the prompt

💡 Pro Tip: Shift+Enter is essential for writing multi-line prompts. Without it, pressing Enter sends the prompt immediately. Use Shift+Enter to add line breaks and structure your instructions before sending.


# Example of a multi-line prompt using Shift+Enter
Fix the date bug in InvoiceDueDate.tsx[Shift+Enter]
[Shift+Enter]
The date shows one day behind for users west of UTC.[Shift+Enter]
Don't change the date-fns library — fix it at the display layer.[Enter to send]

During-Task Shortcuts

These shortcuts work while Claude Code is actively processing your request.

Shortcut Action
`Escape` Interrupt the current operation (Claude Code stops mid-task)
`Ctrl+C` Exit Claude Code entirely

# Interrupting Claude Code mid-task
# Press Escape when Claude Code is doing something you want to stop
Escape

# Claude Code will pause and ask what you want to do next
# You can redirect, correct, or adjust before it continues

When to use Escape: You realize your prompt was ambiguous and Claude Code is heading in the wrong direction. Pressing Escape stops it before it makes more changes, so you can clarify and restart the task.

When to use Ctrl+C: You want to exit Claude Code completely and return to your regular terminal. This ends the session.

⚠️ Warning: If you press Ctrl+C while Claude Code is in the middle of writing files, those partial changes will still be on disk. Always check which files were modified before exiting — you may need to review or revert incomplete changes.


Change Review Shortcuts

These shortcuts work when Claude Code is showing you a diff and waiting for your decision.

Shortcut Action
`y` Accept the proposed change
`n` Reject the proposed change
`a` Accept all remaining changes
`d` Reject all remaining changes (discard)
`e` Open the file in your editor to review it
`?` Show the help menu for review options

# Reviewing a diff — Claude Code shows the change and waits
Apply changes to src/utils/invoiceCalculations.ts? [y/n/a/d/e/?]

y    # Accept this file's changes and move to next
n    # Reject this file's changes and move to next
a    # Accept all remaining files without reviewing each one
d    # Reject all remaining files without reviewing each one
e    # Open this file in your editor for a closer look
?    # Show all available options

Slash Commands (Text-Based Shortcuts)

Slash commands are typed into the prompt field. They’re another way to control Claude Code — useful when you prefer typing over key combinations.

Command Action
`/plan` Switch to Plan Mode
`/auto` Switch to Auto Mode
`/normal` Switch to Normal Mode
`/clear` Clear the current conversation context
`/help` Show available commands and shortcuts
`/status` Show current mode, token usage, and session info
`/undo` Request that Claude Code undo its last change
`/diff` Show the diff for the last change Claude Code made

# Using slash commands in the prompt field
/status
# Output:
# Mode: Normal
# Tokens used: 12,450 / 200,000
# Session started: 14 minutes ago
# Files modified this session: 3

Session and History Shortcuts

These help you manage your Claude Code session over time.

Shortcut / Command Action
`Up Arrow` Load previous prompt from history
`Down Arrow` Navigate forward in prompt history
`/clear` Clear conversation history (start fresh context)
`/resume` Resume a previous session (if session management is enabled)

Understanding sessions and history in more depth is covered in Claude Code Session Management.


IDE-Specific Shortcuts

If you’re using Claude Code inside VS Code or JetBrains, you get additional shortcuts within the editor. These are covered fully in their respective guides:

A few common ones:


# VS Code — Claude Code extension shortcuts
Ctrl+Shift+P → "Claude Code: Open Panel"   # Open the Claude Code panel
Ctrl+Shift+P → "Claude Code: Accept Change" # Accept the current suggestion
Ctrl+Shift+P → "Claude Code: Reject Change" # Reject the current suggestion

A Quick Reference Card

Print this out or keep it open in another tab when you’re starting out:


# Claude Code Quick Reference — most-used shortcuts

MODE SWITCHING
Shift+Tab          → Cycle modes (Normal → Plan → Auto)
/plan              → Plan Mode
/auto              → Auto Mode
/normal            → Normal Mode

PROMPT WRITING
Enter              → Send prompt
Shift+Enter        → New line (don't send)
Up/Down Arrow      → Scroll prompt history
Ctrl+U             → Clear prompt

WHILE CLAUDE CODE IS WORKING
Escape             → Interrupt current task
Ctrl+C             → Exit Claude Code

REVIEWING CHANGES
y                  → Accept change
n                  → Reject change
a                  → Accept all remaining
d                  → Reject all remaining
e                  → Open file in editor

SLASH COMMANDS
/clear             → Clear conversation
/status            → Show session info
/help              → Show help
/undo              → Undo last change

Common Mistakes and How to Fix Them

Mistake 1: Pressing Enter Instead of Shift+Enter for Multi-Line Prompts

Problem: You press Enter mid-prompt to add a new line and accidentally send an incomplete prompt.

Fix: Build the habit: Enter sends, Shift+Enter adds a line. It’s muscle memory after a week.

Mistake 2: Pressing Ctrl+C When You Meant Escape

Problem: You wanted to interrupt a task but accidentally exited Claude Code entirely.

Fix: They’re different operations: Escape = pause this task, Ctrl+C = end the session. Keep this distinction clear in your head.

Mistake 3: Using ‘a’ to Accept All Without Reviewing

Problem: You press a to accept all remaining changes to save time — and miss a problematic change in one of the later files.

Fix: Use a only when you’re confident about all remaining changes. If you’ve seen and approved each file, it’s fine. If you’re skipping the review, that’s a risk.

Mistake 4: Not Knowing /status Exists

Problem: You don’t know how many tokens you’ve used or whether you’re close to the context limit.

Fix: Type /status periodically on long sessions. It shows token usage and helps you decide when to start a fresh session.

Mistake 5: Forgetting That Escape Doesn’t Undo

Problem: Claude Code modified two files, you press Escape to stop, but the first two file changes are already applied.

Fix: Escape stops future work — it doesn’t undo what already happened. To revert, use git or ask Claude Code to undo specific changes.


Key Takeaways

  • Shift+Tab is the most important shortcut — it cycles through all three modes
  • Escape interrupts a task without exiting; Ctrl+C exits entirely
  • During diff review: y accept, n reject, a accept all, d reject all
  • Slash commands like /status, /clear, and /undo are worth memorizing
  • Shift+Enter lets you write multi-line prompts without accidentally sending them

Next Steps

Return to How Claude Code Works — A Beginner’s Deep Dive for the full picture.