Claude Code Shortcuts Cheatsheet
Every Claude Code keyboard shortcut, searchable.
- $15 Free
- 20 sec
- No signup
Search or filter the shortcuts
Learn the ones you're missing
Copy or print the cheatsheet
You get: A searchable, printable list of every Claude Code shortcut.
Session control
- EscInterrupt Claude while it is responding or working
- Esc EscClear the current input, or open the message history to edit a previous prompt
- Ctrl+CCancel the current input; press again to exit Claude Code
- Ctrl+DExit Claude Code (when the input is empty)
- Ctrl+LClear the terminal screen (keeps the conversation context)
- Up / DownCycle through your previous prompts in the input history
Input editing
- Shift+EnterInsert a newline for a multi-line prompt
- \ + EnterInsert a newline (works in terminals that swallow Shift+Enter)
- Ctrl+AMove the cursor to the start of the line
- Ctrl+EMove the cursor to the end of the line
- Ctrl+UDelete from the cursor to the start of the line
- Ctrl+KDelete from the cursor to the end of the line
- Ctrl+WDelete the word before the cursor
Modes and input
- Shift+TabCycle permission modes (default, auto-accept edits, plan mode)
- #Start a line with # to add a memory to your CLAUDE.md
- !Start a line with ! to run a bash command directly
- @Type @ to reference and attach a file by path
- Ctrl+VPaste an image from the clipboard into the prompt
Slash commands
- /helpList available commands and shortcuts
- /clearClear the conversation history and start fresh
- /compactSummarize and compact the conversation to free up context
- /modelSwitch the active model (e.g. Opus, Sonnet, Haiku)
- /initGenerate a CLAUDE.md for the current project
- /reviewAsk Claude to review your recent changes or a pull request
- /configOpen the settings / configuration menu
- /costShow token usage and cost for the current session
- /mcpManage and inspect connected MCP servers
- /memoryView and edit your CLAUDE.md memory files
- /agentsManage subagents for the project
- /vimEnable vim-style keybindings in the input
- /terminal-setupConfigure your terminal for Shift+Enter and other keys
Shortcuts vary slightly by terminal and Claude Code version. Run /help inside the CLI to see the exact bindings for your setup, and /terminal-setup if Shift+Enter is not inserting a newline.
Work faster in the Claude Code terminal
Most people use Claude Code with a fraction of its keyboard shortcuts, which means they type more, interrupt clumsily, and lose context they did not need to lose. This cheatsheet collects the shortcuts and slash commands that matter, grouped by category and searchable, so you can find the one you need and learn the ones you are missing. Search by what you want to do - 'interrupt', 'newline', 'compact' - and copy the whole list to keep beside your terminal.
It is fully client-side. The search and filtering happen in your browser with no network calls. Because bindings differ slightly across terminals and Claude Code versions, always confirm against /help inside your own CLI.
The five shortcuts worth learning first
- Esc - interrupt Claude mid-response. The instant you see it going the wrong way, stop it rather than waiting and paying for output you will discard.
- Shift+Tab - cycle permission modes, including plan mode, where Claude proposes changes without applying them. This is the safety valve for risky work.
- Shift+Enter - add a newline for multi-line prompts. If it does not work in your terminal, run /terminal-setup.
- # at the start of a line - save a memory straight into your CLAUDE.md without leaving the session.
- /compact - summarize a long conversation to reclaim context space instead of losing it to a hard reset.
Esc is your most valuable key
Interrupting early is the single biggest time-and-cost saver. The moment Claude heads in the wrong direction, press Esc, correct it, and let it continue. Waiting for a wrong answer to finish wastes tokens and your time.
Slash commands do the heavy lifting
Slash commands are typed commands, not keyboard chords, and they control the session itself. /clear wipes the conversation for a clean start. /compact summarizes a long session to free up context. /model switches between Opus, Sonnet, and Haiku on the fly. /cost shows what the session has spent. /init generates a CLAUDE.md for a new project. /review asks Claude to critique your recent changes. Learning these five or six commands changes how fluidly you can steer a session.
Managing context like a pro
The most common way sessions go bad is context bloat: the conversation grows so long that every turn reloads a mountain of history, which is slow and expensive. Two commands fix this. /compact summarizes the conversation so far and keeps working with far less baggage - use it when a session has been productive but long. /clear starts completely fresh - use it when you are switching to an unrelated task. Knowing which to reach for keeps sessions fast and cheap.
The special-character prefixes
- Type @ to reference a file by path and attach it to your prompt without copy-pasting its contents.
- Start a line with # to append a note to your CLAUDE.md memory on the spot.
- Start a line with ! to run a raw bash command directly from the Claude Code prompt.
- Paste an image with Ctrl+V to show Claude a screenshot, a design, or an error dialog.
- Use / at the start of a line to reach every slash command, including your own custom ones.
If a shortcut does not work
Terminals intercept keys differently, so a binding that works in one may not in another - Shift+Enter is the usual culprit. Run /terminal-setup inside Claude Code to configure your terminal, or fall back to the backslash-then-Enter method to insert a newline. Whenever you are unsure what a key does in your exact setup, /help prints the authoritative list for your version. Treat this cheatsheet as the map and /help as the source of truth.
Frequently asked questions
How do I interrupt Claude Code mid-task?
Press Esc. It stops the current response or action immediately so you can correct course without waiting for a wrong answer to finish.
How do I type a multi-line prompt?
Use Shift+Enter to insert a newline. If your terminal swallows that combination, run /terminal-setup, or type a backslash followed by Enter.
What is the difference between /clear and /compact?
/clear wipes the conversation entirely for a fresh start on an unrelated task. /compact summarizes the current conversation to reclaim context space while keeping the thread going.
How do I switch models?
Run /model to change the active model between Opus, Sonnet, and Haiku. Switch to a cheaper model for routine work and up to a stronger one for hard reasoning.
Why do some shortcuts not work in my terminal?
Terminals capture certain key combinations before Claude Code sees them, especially Shift+Enter. Run /terminal-setup to configure yours, and use /help to see the exact bindings for your version.
Is this list guaranteed complete for my version?
It covers the widely-documented, stable shortcuts and slash commands, but bindings can change between versions and terminals. Run /help inside your own CLI for the authoritative, up-to-date list.
Liked this tool? The club is the next step.
Join Claude Code Club for $9/month. 650+ lessons, weekly updates, and the workflows behind every tool on this site.
- No experience needed
- Cancel anytime
- Updated weekly
