Claude Code Keyboard Shortcuts & Slash Commands Cheat Sheet (Beginner-Friendly)

Just the essential keyboard shortcuts and slash commands for moving fast in Claude Code. Esc, Ctrl+C, Shift+Tab, permission-mode cycling, the / ! @ prefixes, and handy commands like /clear, /compact, /doctor — as a beginner cheat sheet with visuals.

1 views

Claude Code works with plain natural language, but keyboard shortcuts and slash commands make it much faster. Typing just / in the prompt shows every installed command (60+ built-ins, plus skills, plugins, and MCP commands), but this article is a beginner cheat sheet of the ones you use every day. Note: shortcuts can vary by operating system, terminal, and version (the following is based on the official Claude Code docs).

Shortcuts worth knowing EscInterrupt (keeps work)Ctrl+CCancel / clear inputShift+TabCycle permission modesCtrl+OToggle transcriptEsc EscClear input / rewindCtrl+LRedraw screenCtrl+BBackground a taskRecall last command

Shortcuts worth knowing

Starting with the most common. Esc interrupts Claude mid-response or mid-task while keeping the work done so far. Ctrl+C interrupts a running operation; if nothing is running, the first press clears the input and a second press exits Claude Code. When the prompt has text, pressing Esc twice clears it (the draft is saved to history, so recalls it); when the input is empty, a double Esc opens the rewind menu to restore an earlier point.

If the display gets garbled or partially blank, Ctrl+L redraws it (your conversation is kept), and Ctrl+O toggles the transcript viewer that shows detailed tool usage. Long-running commands can be moved to the background with Ctrl+B so you can keep working.

Shift+Tab — change the permission mode

Whether Claude Code asks before every file edit, auto-accepts them, or just plans first is controlled by the permission mode. Each press of Shift+Tab cycles through the modes.

Shift+Tab — cycle permission modes defaultask each timeacceptEditsauto-accept editsplanplan first↻ Each Shift+Tab moves to the next mode The current mode is shown below the prompt.

default asks for confirmation on each action, acceptEdits auto-accepts file edits, and plan mode lays out a plan before acting. Any other modes you have enabled join the cycle too. The current mode is shown below the prompt.

The first character: / ! @

The first character of your input changes what happens.

First character of your input /Command / skillRun a command!Shell modeRun terminal cmd directly@File mentionFile path autocomplete

Starting with / runs a command or skill. Starting with ! enters shell mode, running a terminal command (e.g. ! npm test, ! git status) directly without going through Claude, and adds its output to the conversation context. Typing @ brings up file-path autocomplete so you can point at a specific file.

Handy slash commands

See the full list by typing / in the prompt (keep typing to filter). Here are the ones you will reach for most.

Handy slash commands /clearNew session (clear chat)/compactCompact context/doctorDiagnose / check/configSettings (vim · theme)/resumeResume a session/mcpManage MCP servers/terminal-setupSet up Shift+Enter/btwAsk off-the-record/recapSession summary
  • /clear — Clears the conversation and starts a new session. The previous conversation is preserved and can be picked up later with /resume.
  • /compact — Compacts a long context. You can specify what to keep (e.g. /compact keep only the error handling).
  • /doctor — Checks installation, settings, MCP servers, and context usage in one pass.
  • /config — Settings screen: toggle vim editor mode, theme, session recap, and more.
  • /resume — Pick a previous session and continue it.
  • /mcp — View and manage connected MCP servers.
  • /terminal-setup — Installs the Shift+Enter newline binding for VS Code, Cursor, and similar.
  • /btw — Ask a quick question without adding it to the conversation history (it does not derail your current task).
  • /recap — Summarizes the session so far at a glance.

Entering multiple lines

To write a multi-line prompt, use \ followed by Enter (works in all terminals), or Ctrl+J which works with no configuration. Shift+Enter works natively in some terminals (iTerm2, Windows Terminal, and others); in VS Code, Cursor, and similar, run /terminal-setup once. On macOS, using Alt-style shortcuts (like Alt+P to switch model) requires setting Option as the Meta key in your terminal.

Wrap-up

In short, just learning to stop with Esc, switch modes with Shift+Tab, and type fast with /, !, and @ makes Claude Code much smoother. You can always see every command by typing /, and for the full reference see the official docs (Interactive mode). For what to do when it is slow or freezing, see the performance and stability guide.

Keep reading

Have a question or want to share how you use Claude?

Join the community to share tips with other users, or explore more guides.