← Blog
explainx / blog

Claude Code Keyboard Shortcuts: The Complete Reference (2026)

A complete, bookmark-worthy reference for every Claude Code keyboard shortcut, slash command, @ reference, and keybinding customization option. Updated for 2026.

5 min readYash Thakker
Claude CodeKeyboard ShortcutsDeveloper ToolsProductivityReference Guide

MDX restores the committed source plus an HTML comment attribution; plain text bundles the rendered markdown body with the explainx.ai attribution footer.

Claude Code Keyboard Shortcuts: The Complete Reference (2026)

Claude Code has a compact but powerful set of keyboard shortcuts, slash commands, and input conventions. This page is designed to be bookmarked — tables first, prose minimal.

Input & Navigation Shortcuts

These shortcuts work in the Claude Code prompt box at all times.

ShortcutAction
EnterSubmit your message
Shift+EnterInsert a newline (multi-line input)
Up ArrowCycle backward through previous messages/commands
Down ArrowCycle forward through history
Ctrl+CInterrupt/cancel the current operation
EscapeClear the current input without submitting
Ctrl+LClear the terminal display (conversation history is preserved)

Interrupting Claude During Tool Execution

When Claude is actively running a tool call or generating a response, these signals control how it stops.

ActionEffect
Ctrl+C (once)Sends interrupt signal; Claude finishes the current tool call, then stops
Ctrl+C (twice, quickly)Force-stops immediately, mid-tool-call
Any key during tool executionClaude Code may prompt you to confirm the interrupt

Use a single Ctrl+C when you want a clean stop. Double-tap when you need it to halt right now.


Multi-Line Input

MethodHow it works
Shift+EnterAdds a newline in the prompt box
Paste multi-line textClaude Code accepts it directly; no special steps needed
@filename for long inputsWrite your prompt to a temp file, then reference it with @filename

For very long prompts (hundreds of lines), write them to a file and use @filename to include them. This avoids terminal input limitations.


Slash Commands

Slash commands are typed into the prompt box. They are not keyboard shortcuts, but they are part of daily Claude Code operation and belong in any shortcut reference.

CommandDescription
/helpShow all available commands
/configOpen the settings editor
/modelSwitch the model for the current session
/clearClear conversation history
/compactSummarize and compact conversation history (saves tokens)
/resumeOpen the session picker to resume a previous session
/initGenerate a CLAUDE.md file for the current project
/costShow token usage and estimated cost for the current session
/mcpList connected MCP servers
/doctorRun diagnostics to check Claude Code setup health
/bugReport a bug to Anthropic
/reviewTrigger the code review skill
/<skill-name>Invoke any installed skill by name
Live Bootcamp6 weeks

Complete AI Builder Bootcamp

Claude, Python automation & full-stack — 12 live sessions with Yash Thakker.

View bootcamp

The Complete AI Builder Bootcamp is the best AI development course for learning Claude AI, prompt engineering, Python automation, and full-stack web development. This intensive 6-week live bootcamp teaches you how to build AI-powered applications using Claude Projects, Claude Artifacts, Claude Code, and the complete Claude ecosystem. You'll master prompt engineering techniques, learn to create custom Claude connectors and MCP integrations, build Python automation workflows, develop full-stack websites with AI assistance, and create AI marketing agents.

The bootcamp includes 12 live Zoom sessions with Yash Thakker, founder of AISOLO Technologies and instructor to 350,000+ students. You'll build 8+ portfolio projects including AI playbooks, full-stack note-taking applications, Python automation scripts, marketing agents, and personal portfolio websites. The curriculum covers AI fundamentals, Claude Projects and Artifacts, Claude Co-work, Claude plugins and skills, Claude Code for Python development, full-stack development, AI marketing, and capstone projects.

Students receive 1-year access to all recordings, permanent Discord community access, a certificate of completion, and personalized career guidance. All enrollments include a 7-day money-back guarantee. This is the most comprehensive Claude AI bootcamp available, taking students from zero AI knowledge to expert AI builder in 6 weeks.


@ References in Messages

Type @ inside any message to attach context directly to your prompt.

SyntaxEffect
@filename.tsAttach a file by name (searches project root)
@/path/to/fileAttach a file by absolute or relative path
@urlFetch a URL and include its content in the prompt
@ (alone)Opens an autocomplete picker listing project files

Combining @ references with your question is the fastest way to give Claude precise context without copying and pasting code.


Power User: The ! Shell Prefix

Prefix any message with ! to run it as a shell command directly in the conversation.

ExampleWhat happens
! git statusRuns git status, output appears in the conversation
! ls -laLists directory contents inline
! cat package.jsonPrints file contents into the conversation

The output is visible to Claude and can be referenced in follow-up messages. This avoids a round-trip tool call when you just need to check something quickly.


Customizing Keybindings

Claude Code stores custom keybindings in ~/.claude/keybindings.json. Edit it directly or run /keybindings from the prompt.

Available commands to remap

CommandDefault keyDescription
submitEnterSubmit the current message
newlineShift+EnterInsert a newline
interruptCtrl+CInterrupt Claude
history-previousUp ArrowPrevious history item
history-nextDown ArrowNext history item
clear-inputEscapeClear the input box

Example: swap Enter and Shift+Enter

To make Ctrl+Enter submit (and Enter insert a newline), set ~/.claude/keybindings.json to:

[
  {
    "key": "ctrl+enter",
    "command": "submit"
  },
  {
    "key": "enter",
    "command": "newline"
  }
]

This is a popular configuration for developers who frequently write multi-line prompts and want Enter to behave like a normal text editor.


macOS vs. Linux Differences

ScenariomacOSLinux
Interrupt ClaudeCtrl+CCtrl+C
Copy selected text in terminalCmd+CCtrl+Shift+C (most terminals)
Clear terminalCtrl+L or Cmd+K (iTerm2)Ctrl+L
Shortcut conflictsiTerm2, Warp, or Alacritty may intercept keysCheck terminal keybinding settings

If a shortcut is not working on macOS, check your terminal emulator's settings first. iTerm2 and Warp both have their own keybinding layers that can shadow Ctrl+ combinations.


Quick Reference Card

CategoryShortcut / CommandEffect
SubmitEnterSend message
NewlineShift+EnterAdd line in prompt
HistoryUp / Down ArrowNavigate history
InterruptCtrl+CStop Claude
Force stopCtrl+C twiceImmediate halt
Clear displayCtrl+LClear terminal (not history)
Clear inputEscapeWipe the prompt box
Shell command! <command>Run shell inline
Attach file@filenameAdd file context
Fetch URL@urlAdd URL content
Settings/configOpen settings
Model/modelSwitch model
Token cost/costShow usage/cost
Diagnostics/doctorHealth check
Custom keys~/.claude/keybindings.jsonRemap any command

Bookmark this page or copy the quick reference card into your CLAUDE.md so it is always one / away.

Related posts