Keyboard Shortcuts
Complete Claude Code shortcuts guide: Shift+Tab mode switching, Esc+Esc rewind, Ctrl+S prompt stash, Ctrl+B background tasks, Readline keys & more
Claude Code's shortcut system is richer than most people realize -- press ? to see every shortcut available in your current context.
Shift+Tab: Cycle Through Modes
This is probably the single most important shortcut. Pressing Shift+Tab cycles between three modes:
Normal Mode → Auto-Accept Mode → Plan Mode → Normal Mode
No need to type /plan or /auto-accept manually -- one key does it all. My workflow: when I get a new task, I tap it twice to jump into Plan Mode, confirm the approach, then tap once more to switch to Auto-Accept and let Claude execute on its own.
Esc + Esc: The Time Machine

Double-tap Esc and a rewind menu pops up:

- Restore code and conversation: Roll back to a previous checkpoint -- both files and chat history revert
- Conversation only: Roll back messages but keep the current code changes
- Code only: Undo file modifications but keep the conversation history
Claude automatically tracks every file edit as a checkpoint. This is far more granular than git checkout . because you can step back to any individual edit, not just the last commit.
One caveat: only files that Claude edited directly through tools are tracked. Files you changed by hand, git push, or other external operations can't be rewound.
Ctrl+S: Prompt Stash
Halfway through writing a prompt and need to handle something else first? Press Ctrl+S and your current input gets stashed:

You can then type another command or question. After you submit that message, the stashed content automatically restores into the input box so you can pick up right where you left off.
Think of it as git stash but for prompts. Example scenario: you're writing a lengthy refactoring request, then realize you want Claude to check a file first -- press Ctrl+S to stash the request, ask your file question, and once that's answered your request comes right back.
Ctrl+B: Send Tasks to the Background
Claude is in the middle of a long-running task (like a big refactor) and you want to work on something else? Press Ctrl+B to push the current task to the background -- your terminal is immediately free for new input.
Use Ctrl+T to view the background task list, and double-tap Ctrl+F to kill all background agents.
tmux users: tmux's default prefix key is also
Ctrl+B, so you'll need to press it twice to trigger Claude's background feature.
Ctrl+G: Write Long Prompts in Your Editor
Sometimes you need to give Claude a lengthy set of instructions and typing in the terminal is painful. Press Ctrl+G to open your system's default $EDITOR (VS Code, Vim, etc.), write your prompt there, and it gets sent to Claude automatically when you save and close.
To change the default editor, set it in your shell config (~/.zshrc or ~/.bashrc):
# VS Code
export EDITOR="code --wait"
# Zed
export EDITOR="zed --wait"
# Vim
export EDITOR="vim"The --wait flag is important -- it tells the editor to block until you close the file, otherwise Claude receives empty content immediately. Terminal editors like Vim block naturally, so they don't need it.
Super useful for multi-paragraph requirement descriptions or pasting large reference material. In Plan Mode, you can even use Ctrl+G to edit Claude's generated plan directly in your editor.
Cmd+T: Toggle Extended Thinking
The default shortcut is Cmd+T (or Meta+T on Windows/Linux) and it toggles Extended Thinking mode. When enabled, Claude reasons more deeply before responding -- great for complex architecture decisions or tricky bug hunts.
Fair warning: most terminals (iTerm2, Terminal.app, Warp, etc.) intercept Cmd+T as "new tab," so this shortcut often doesn't work in practice. Two workarounds: use /keybindings to remap it to a non-conflicting key, or just use the /effort command to switch thinking depth (same effect, plus you get fine-grained level control).
Readline Shortcuts
Claude Code's input box supports standard Readline shortcuts -- terminal veterans will feel right at home:
| Shortcut | Action |
|---|---|
| Ctrl+A | Jump to beginning of line |
| Ctrl+E | Jump to end of line |
| Ctrl+W | Delete previous word |
| Ctrl+U | Delete to beginning of line |
| Ctrl+K | Delete to end of line |
| Ctrl+Y | Paste last deleted text |
| Alt+Y | Cycle through delete history |
| Option+Left/Right | Jump by word (Mac) |
Approval Shortcuts: y/n/d/e
When Claude proposes a file change and waits for confirmation, four single-key shortcuts control the flow:
y: Acceptn: Rejectd: View full diffe: Edit before accepting
e is the most overlooked yet most useful one -- it lets you tweak Claude's changes before they're applied. Not happy with a few lines? No need to reject and redo; just press e and fix it.
Quick Reference
| Shortcut | Action |
|---|---|
| Shift+Tab | Cycle modes: Normal → Auto-Accept → Plan |
| Esc+Esc | Open rewind menu |
| Ctrl+S | Stash current input, auto-restores after next submit |
| Ctrl+B | Push current task to background |
| Ctrl+T | View background task list |
| Ctrl+F (x2) | Kill all background agents |
| Ctrl+G | Write prompt in external editor |
| Ctrl+O | Toggle verbose tool output view |
| Cmd+T | Toggle extended thinking (may be intercepted by terminal; consider remapping or using /effort) |
\ + Enter | Multi-line input (no setup needed) |
| Shift+Enter | Multi-line input (requires /terminal-setup first) |
| Up / Down | Browse input history |
| Ctrl+R | Search command history |
| Ctrl+L | Clear screen (history preserved) |
| Ctrl+C | Cancel current generation |
| Ctrl+D | Exit Claude Code |
? | Show all available shortcuts |
Custom Keybindings
If the defaults don't suit you, run /keybindings to open ~/.claude/keybindings.json and customize away. Changes take effect immediately -- no restart required.
The syntax supports combo keys (e.g., ctrl+shift+c) and chord sequences (e.g., ctrl+k ctrl+s -- press Ctrl+K, release, then press Ctrl+S). There are 16 different binding contexts (Chat, Autocomplete, Confirmation, DiffDialog, etc.), each with its own set of bindable actions.