knack
← all posts

Claude Code Keyboard Shortcuts: The Six That Matter and the Rest

Six shortcuts cover ninety percent of daily use. The other forty in the official reference are situational. Learn these six and the three prefixes first.

Six Claude Code keyboard shortcuts cover ninety percent of daily use. The other forty in the official keybindings reference are situational. Learn these six and the three prefixes (/, @, !) first.

Shortcut What it does
Esc Interrupt Claude mid-response. Work done so far is kept.
Esc Esc On empty input, opens the rewind menu. On filled input, clears the draft.
Shift+Tab Cycle permission modes: defaultacceptEditsplan.
Ctrl+C First press clears the prompt. Second press exits Claude Code.
Ctrl+R Reverse-search command history across sessions, projects, and prompts.
Tab Accept the grayed-out prompt suggestion, or an autocomplete item.

That table is the answer if you came here from a search engine. Everything below is detail.

The Esc family does more than you think

Esc interrupts the current turn. Claude stops talking, stops the tool call mid-stream, and hands you the prompt back. Work done up to that point stays in context, so you can redirect with "stop reading more files, answer from what you already saw." Most new users miss this one. Without it you wait for Claude to finish a wrong path. With it you steer.

Double-Esc is two shortcuts in one. With empty input, it opens the rewind menu, which rolls the conversation and optionally Claude's file edits back to a previous point. With text in the prompt, double-Esc clears the draft but stashes it so Up arrow brings it back.

Shift+Tab is the permission-mode pedal

Shift+Tab cycles permission modes inline. Plan mode lets Claude read and search but blocks edits, so you can ask for a design before any file gets touched. acceptEdits skips approval prompts on writes. On older Node or Bun without VT mode on Windows, the default is Meta+M.

Ctrl+C and Ctrl+R are different from your shell

In Claude Code, the first Ctrl+C does not kill the process. It clears your input. A second press exits. To stop a running response, use Esc. To exit cleanly, use Ctrl+D.

Ctrl+R reverse-searches your entire Claude history across every project. Press Ctrl+S inside the search to narrow scope to this project, then this session. Tab or Esc accepts the match for editing; Enter accepts and submits.

Tab completion is the hidden one

Tab does three things and most people use one. After /sk, Tab accepts the highlighted completion. When the prompt has a grayed-out suggestion (Claude generates these from git history and conversation), Tab fills it in. In shell mode, Tab completes from prior ! commands in that project.

The three prefixes: /, @, !

These are input modes, not shortcuts. They change what the first keystroke does, and / plus @ are the two non-default conventions most teams learn together. Knack publishes SKILL.md packages that appear in the / menu alongside built-ins.

/ opens the command and skill menu with live filtering. /cl narrows to /clear, /co to /compact. The list includes /init, /model, /agents, /skills, /plugin, plus every Skill and MCP-provided command in your workspace.

@ triggers file-path autocomplete anywhere in your prompt. Type @src/ and a picker appears; pick a file and it gets injected as a reference Claude will read. Folders work the same way.

! flips the prompt into shell mode. The command runs in your shell, the output joins the conversation, and Claude sees both. ! git status, ! npm test, ! ls -la. The captured output means you can immediately ask "fix the failing test" without a tool roundtrip. Ctrl+B backgrounds it.

The next six: situational

Ctrl+O toggles the transcript viewer; collapsed MCP calls expand there. Ctrl+T toggles the task list when Claude is tracking multi-step work. Ctrl+L redraws the terminal when output gets garbled. Ctrl+G opens your $EDITOR for a long prompt, then drops the saved buffer back in. Ctrl+V pastes a clipboard image as an [Image #N] chip (Alt+V on Windows). And Option+P on Mac (Alt+P elsewhere) swaps the model mid-session without clearing your prompt, which is the one I reach for most.

Multi-line input: Shift+Enter works without configuration in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, and Windows Terminal. In VS Code, Cursor, Windsurf, Alacritty, and Zed, run /terminal-setup once. Universal fallbacks are \ then Enter and Ctrl+J, both zero-config.

Mac users have one configuration tax. Option+P, Alt+Y, Alt+B, and Alt+F need Option set as Meta. In iTerm2: Settings → Profiles → Keys → Left/Right Option key set to "Esc+". Apple Terminal: Profiles → Keyboard → "Use Option as Meta Key". VS Code wants "terminal.integrated.macOptionIsMeta": true. Without it, Option is dead except for shortcuts (like Option+T since v2.1.132) that ship with their own escape sequence.

One legacy note. The # prefix used to append a line to CLAUDE.md inline. It was removed; the current path is /memory or telling Claude "remember that we use TypeScript strict mode" and letting it write the file.

Run /keybindings to rebind any of this. The file lives at ~/.claude/keybindings.json. Reserved keys (Ctrl+C, Ctrl+D, Ctrl+M, Caps Lock) cannot move.

Memorize the six in the table. Use /, @, and ! deliberately for a week. The rest you'll pick up the next time something feels slower than it should.