Plenty of people use Claude Code, but surprisingly few have gone as far as learning its keyboard shortcuts. The opening line of a Medium post by one developer nails the problem exactly.
"Most developers are using only 40% of Claude Code's features.
These 10 shortcuts unlock the other 60%."
Type, hit Enter, approve a tool call, repeat. That's how most people use it. But Claude Code is more than a chat box. There's a shortcut that instantly kills a stalled agent, a command that lets you ask a side question without interrupting a response in progress, a vim editor built into the input field, and a bash mode that runs shell commands with the conversation context attached. Because no single resource has pulled all of this together in one place, a lot of people are simply leaving speed on the table.
Here, in order of practical value, are the shortcuts and commands that work in Claude Code v2.1.111 and later, as of May 2026.
The Five to Memorize First
Learn just these five and you'll feel the difference in your working speed.
Esc + Esc — Rewind
This is the most important shortcut of them all. Double-tap Esc and the rewind menu opens, offering three choices: roll back the conversation only, roll back the code only, or roll back both.
Here's why it's powerful: when you realize you should have asked a different question twenty messages ago, you can jump back to that message and start over. The original branch is preserved — you simply head in a new direction on a new branch.
Ctrl+C stops what's happening right now; Esc + Esc turns back time. When you sense things drifting in the wrong direction, Esc + Esc is the answer far more often than Ctrl+C.
Shift + Tab — Cycle Permission Modes
Cycles between Claude Code's three modes.
- Normal mode. Asks for permission every time.
- Plan mode. Claude only reads; it doesn't edit. Useful when the mood is "let's talk through the approach first."
- Auto-accept mode. Runs every allowlisted tool without asking. Use with care on production code.
Plan mode while you explore, auto-accept while you build. Switching modes to match the phase of your work makes a real difference in productivity.
Ctrl + G — Open an External Editor
Opens your system's default editor (usually whatever your $EDITOR environment variable points to). It proves its worth when the single-line terminal input starts feeling cramped.
When you're writing a complex, multi-paragraph prompt, you can compose it in a real editor, save, and it sends as is. It's a way to give a complex prompt the same care you put into your CLAUDE.md.
Alt + T — Toggle Extended Thinking
Toggles extended thinking on and off mid-session. Flip it on when you hit a task that demands serious reasoning, and the way Claude approaches the problem fundamentally changes.
If you've just sent a message and think, "this one really needed deeper thought," you can enable extended thinking for the next response without stopping the current one. On macOS, the Option key must be set to act as Meta (in iTerm2, set Left/Right Option to "Esc+" under Settings > Profiles > Keys).
Ctrl + F — Kill All Background Agents
Press it twice within three seconds and every background agent dies. Use it to sweep away stalled tasks, agents stuck in infinite loops, or work heading in the wrong direction — all in one stroke.
The first Ctrl+F raises a warning; the second confirms. It's a safeguard against accidental presses. Press it once right now and you'll see exactly what happens.
The Next Five to Learn
\ + Enter — Multiline Input
A backslash followed by Enter inserts a line break. Use it when your prompt runs to several lines rather than one short sentence. It's the right choice when opening an external editor with Ctrl+G feels heavier than the moment calls for.
Option + P (Mac) / Alt + P — Switch Models
Changes the model mid-session. Haiku for exploration, Sonnet for everyday coding, Opus for complex refactoring. Switching models to match the nature of the work lets you balance cost against quality.
Opus 4.7 defaults to a new xhigh effort level for coding and agentic work. You can also set it manually with the /effort xhigh command.
Ctrl + L — Clear the Screen
Wipes the screen clean while keeping the conversation intact. Handy when long output has cluttered the display.
To erase the conversation itself, use /clear. To compress the conversation and save context, use /compact. These three are easy to mix up, so it pays to keep them straight.
@ — File Mentions
Type @ followed by a file path and autocomplete kicks in. Claude reads that file before it responds.
Refactor @src/auth/login.ts to use the new session API
What does @validateUser do, and where is it called?
It's faster than typing "take a look at src/auth/login.ts," because the path is validated at autocomplete time.
! — Shell Mode
Start a prompt with ! and everything after it runs as a shell command — and the output becomes part of the conversation.
!git log --oneline -5
!find . -name "*.test.ts" | head
No more opening a separate terminal, running a command, and pasting the results back in. Claude builds its next response having already seen the output.
Commands Worth Knowing
Beyond the keyboard shortcuts, a handful of slash commands earn regular use.
| Command | What it does |
|---|---|
/help | Full list of available commands |
/clear | Wipe the conversation history entirely |
/compact [instructions] | Summarize the conversation to save context |
/model opus | Switch to Opus |
/model sonnet | Switch to Sonnet |
/model haiku | Switch to Haiku |
/effort xhigh | Opus 4.7's highest reasoning level |
/btw | Ask a side question without interrupting the current task |
/add-dir <path> | Add another folder to the working directories |
/doctor | Check installation health and keybinding warnings |
/keybindings | Open the keybindings config file |
/cost | Show the current session's cost and duration |
/mcp | Manage MCP servers |
/exit | End the session |
Why /btw Is Interesting
Of all of these, /btw is the relative newcomer, released in March 2026. Erik Schluntz of the Claude Code team built it as a side project, and when lead Thariq Shihipar announced it on March 11, the tweet racked up 2.2 million views.
The problem it solves is clear. Claude is in the middle of refactoring a big module when you suddenly wonder about something else — previously, that meant canceling the response, asking your question, and prompting all over again. /btw lets you toss in a side question without breaking the work in progress. The answer isn't added to the conversation history and doesn't touch the context window. It has no effect on what Claude "remembers" in that session.
It shines during long-running tasks: the work keeps moving while you ask, off to the side, "wait, how does this work again?"
Customizing Your Shortcuts
In Claude Code v2.1.18 and later, you can remap the shortcuts yourself. Run /keybindings and the ~/.claude/keybindings.json file opens.
json
{
"bindings": [
{
"context": "chat",
"keys": {
"ctrl+s": "chat:send",
"ctrl+k": "app:commandPalette"
}
}
]
}Each binding consists of a context (where it applies), a key combination, and an action. You can carry over the shortcuts you've been using in VS Code, Vim, or Emacs.
The key-combination syntax is intuitive.
ctrl+k— Ctrl + Kshift+tab— Shift + Tabmeta+p— Option + P on a Mac, Alt + P on other systemsctrl+shift+c— combining multiple modifier keys
If a shortcut conflicts with something else, /doctor will surface the warning.
The One Setting Every Mac User Needs
To use shortcuts like Alt + P, Alt + T, Alt + B, and Alt + F on a Mac, your terminal needs the Option key set to act as Meta.
iTerm2. Settings > Profiles > Keys > set Left/Right Option to "Esc+".
Terminal.app. Check "Use Option as Meta Key" under Profiles > Keyboard.
If the setup feels confusing, just run /terminal-setup — it checks your current configuration and walks you through it.
The Order to Learn Them In
Don't try to memorize everything at once. This sequence works best.
Week 1: rewind and mode switching. Esc + Esc and Shift + Tab. These two alone will transform your workflow.
Week 2: input efficiency. Ctrl + G (external editor), \ + Enter (multiline), and @ (file mentions) — the tools for writing prompts fast and accurately.
Week 3: shell and models. ! (shell mode) and Option + P (model switching). This is the stage where you start matching tools and models to the task at hand.
Week 4: side commands. /btw, /compact, /clear. This is the context-management stage.
Spend four weeks working through this order, and Claude Code stops being a chat box and becomes a genuine working environment.
The Difference Shortcuts Make
All of this can look like minor convenience features. But the one or two seconds a shortcut saves, multiplied by dozens of times a day, adds up to a real difference. More important still: shortcuts don't break the flow of your work.
The single second spent mousing through a menu seems trivial, but each of those seconds interrupts the train of thought in your head. Shortcuts are a tool for keeping that train of thought intact. Their real value isn't the time saved — it's the focus sustained.
If you use Claude Code every day and any of the shortcuts above are new to you, try them right now. The deeper your command of a tool, the better the work it produces. The gap between the fastest people and the slowest isn't a difference in tools — it's how deeply they've mastered the same one.



