Keyboard Shortcuts — Claude Cert Academy
Keyboard Shortcuts
Claude Code keyboard shortcuts span the CLI, slash commands, and IDE extensions. Learning them reduces friction in daily use.
CLI Shortcuts
- Ctrl+C — cancel the current operation. If Claude is mid-response or running a tool, this interrupts it. Press twice quickly to force-exit.
- Ctrl+D — send EOF and exit the Claude Code session cleanly (same as /exit).
- Up / Down arrows — navigate through prompt history within the current session.
- Esc — clear the current input line without submitting.
- Ctrl+R — reverse search through prompt history (same as bash). Type to filter.
- Backslash (\) at end of line — line continuation: press Enter after \ to continue typing on the next line before submitting.
- Esc then Enter — insert a newline into the current input (multi-line prompt) without submitting.
Slash Commands
Slash commands are typed at the Claude Code prompt. They control session behavior, not the model.
- /clear — clear conversation history. Keeps session open but removes prior context. Use when context window is filling up.
- /compact — compact the conversation history using a summary. Reduces token usage while preserving key context.
- /resume — resume a previous session by ID. Prompts for session ID if not provided.
- /plan — switch to plan-only mode for the remainder of this session. Claude will plan but not execute tools.
- /model — switch the active model mid-session. Prompts with a model picker.
- /config — open the settings editor (settings.json) in your $EDITOR.
- /mcp — show the status of all configured MCP servers and their registered tools.
- /voice — toggle voice input mode (where supported).
- /loop — self-paced looping mode: Claude re-invokes itself on an interval or on each completion.
- /cost — show cumulative token usage and estimated cost for the current session.
- /bug — file a bug report with the current session context attached.
- /help — show all available slash commands and their descriptions.
- /exit — exit the Claude Code session cleanly (same as Ctrl+D).
VS Code Extension
- Cmd+Shift+P (Mac) / Ctrl+Shift+P (Windows/Linux) — open the command palette, then type Claude Code to find available commands (open panel, run prompt, etc.).
- @-mention syntax — in the Claude Code panel, type @ to mention a file, symbol, or workspace item. Claude reads the mentioned context automatically.
- Inline diff — when Claude proposes file changes, a diff view appears inline. Use the Accept / Reject buttons or keyboard shortcuts shown in the diff view header to apply or discard each change block.
- Accept all — button in the diff view to accept all proposed changes at once.
- Reject all — button in the diff view to discard all proposed changes.
JetBrains Extension
- Claude Code tool window — access via View > Tool Windows > Claude Code, or the toolbar button. The default keyboard shortcut is set during installation (check Preferences > Keymap > Claude Code).
- Accept diff — in the JetBrains diff view, use the right-arrow button or the keyboard shortcut shown in the diff gutter to accept a change block.
- Reject diff — use the left-arrow button or shortcut to reject a change block.
- Re-run last prompt — keyboard shortcut available in the Claude Code tool window (check Keymap for your OS binding).
Continue to Claude Cert Academy