Skip to content

Keyboard

Shortcuts

Everyone learns Esc. These are the rest — all checked against Claude Code itself, not copied off a blog.

The three to learn first

If you remember nothing else.

  • Esc Esc
    Stop Claude mid-action The moment Claude starts doing something you did not intend.
  • Esc thenEsc Esc thenEsc
    Clear the input box Your half-written prompt has turned into a mess and you want a clean line.
  • Shift +Tab Shift +Tab
    Cycle permission mode Starting an exploration (plan) or letting an agreed plan run (accept edits). On older Windows setups without VT mode, this is Meta+M instead.

Writing the prompt

Composing, searching, pasting.

  • Ctrl +J Ctrl +J
    Start a new line without sending Any prompt longer than one sentence.
  • Ctrl +R Ctrl +R
    Search your prompt history "What did I type last week that worked?" Inside the search, Ctrl+S cycles the scope: this session → this project → everywhere.
  • Ctrl +S Ctrl +S
    Park the half-written prompt You are three sentences into a prompt and need to go check something.
  • Ctrl +G Ctrl +G
    Edit the prompt in your real editor Writing anything long or carefully structured.
  • Ctrl +V Alt +V
    Paste an image Anything visual. Annotate the screenshot first and it works even better. Ctrl+V, not Cmd+V — macOS keeps Cmd+V for its own paste. Windows and WSL use Alt+V. On WSL both Ctrl+V and Alt+V work.
  • Option +T Alt +T
    Toggle thinking for the next turn One hard question in the middle of otherwise simple work.
  • Ctrl +_ Ctrl +_
    Undo in the input box You deleted half a prompt by accident.

Seeing what happened

What Claude did and what it plans to do.

  • Ctrl +O Ctrl +O
    Toggle the full transcript You want to know what it actually did, not the summary.
  • Ctrl +T Ctrl +T
    Toggle the task checklist Any multi-step task, before it gets far.

Running the session

Long jobs, models, the terminal.

  • Ctrl +B Ctrl +B
    Send the running job to the background A long build, test run, or search you do not want to sit and watch.
  • Option +P Alt +P
    Switch model Between tasks — rarely a good idea mid-task.
  • Option +O Alt +O
    Toggle fast mode Straightforward work where you would rather have speed than depth.
  • Ctrl +Z Ctrl +Z
    Step out to the shell without quitting You need the terminal for one command and do not want to lose the session. Terminal-level shortcut (Unix SIGTSTP), not a Claude Code binding. Windows has no direct equivalent.

The keys are the same on both systems — only the modifier's name changes (macOS calls Alt Option). Run /keybindings in any session to see exactly what is bound on your machine.

/compact and /clear — context-window discipline

← Tips Context discipline

/compact and /clear — context-window discipline

Don't carry irrelevant history. Use `/` to summarise the conversation when staying on-task, `/clear` to wipe and start fresh when switching tasks. Know that compacting trades detail for room — for work you care about, a handoff to a fresh preserves more.

both

Every has a finite . Once it’s full, Claude starts forgetting the earliest parts. Two commands keep your session healthy:

  • /compact — Claude summarises the conversation so far and continues with the condensed version. Use this when you’re still on the same task but the session has grown long. You keep the relevant context; you lose the noise.

  • /clear — wipes the conversation entirely and starts fresh. Use this when you’re switching to an unrelated task. Carrying old context into a new task makes Claude’s answers worse, not better, because it tries to relate the new task to whatever it remembers.

Rough rule: if you’re about to type “ignore everything we discussed before…”, you should have used /clear instead.

What /compact costs you

is a summary, and a summary is lossy. Specific details — the exact error string, the file path you looked at once, the thing you tried that didn’t work — are the first casualties, because they don’t look important to a summariser. What survives is the shape of the conversation, not its particulars.

So: /compact buys you room to keep going, and the price is detail. That’s a fine trade for “we’re mid-task and the session has grown long”. It’s a bad trade for anything you’d be annoyed to lose.

For work you care about, hand off instead. Ask Claude to write a handoff pointing at the files that matter and naming what’s already been ruled out, then start a fresh session with it. You choose what survives rather than letting a summariser choose. See the handoff-not-summary tip.

Practical split:

  • Mid-task, session getting long, details are all still on disk → /compact is fine.
  • End of day, or anything you’d hate to re-derive → handoff, then /clear.
  • Switching topic entirely → /clear.

Compact before it compacts you

will auto-compact when the window fills. You can decide when that happens rather than accepting the default:

/autocompact

“Set how full the context gets before auto-summarizing.” Setting it lower means more frequent, smaller summarisations instead of one big one at the worst moment. Run /context to see how full you actually are — it draws the window as a grid.

Next tip →

Correct with 'No, what I meant was…'

When Claude misunderstood, lead the correction with 'No, what I meant was…' — it's shorter than re-explaining everything and Claude takes the cue cleanly.