explainx.ainewsletter3.5k
TrendingNewsPathwaysSkills
Pricing
explainx.ai

Upskill in AI — 16 free pathways, live workshops & bootcamps, and 50+ courses from practitioners. Plus the skills, tools, and MCP servers to practice on.

follow us

custom AI agents

[email protected]

get started

Find your pathTake Free Evaluation

learn

pathways — start freeworkshopsbootcampscoursescertificationsmock testsexplainx universitycorporate traininglearn skills & mcp

discover

skillsmcp serversexplainx mcptoolsagentsllmsdesignsagi trackerranks

company

aboutvisionmissionteaminstructorscommunityhackathonscareers

content

daily AI newsstate of AI — live resultsblogreleasespromptsgeneratorsresource librarydemofor LLMs

solutions

all solutionsdeveloper upskillingmarketing upskillingproduct manager upskillingleadership upskilling

More from us

InfloqInfluencer marketingBgBlurPrivacy-first blurOlly SocialSocial AI copilotCeptoryVideo intelligenceBgRemoverBackground removal

newsletter · weekly

Get AI news, tools, and insights in your inbox.

supportprivacytermsdata rightssubmission guidelines

© 2026 AISOLO Technologies Pvt Ltd

On this page

  • Input & Navigation Shortcuts
  • Interrupting Claude During Tool Execution
  • Multi-Line Input
  • Slash Commands
  • @ References in Messages
  • Power User: The ! Shell Prefix
  • Customizing Keybindings
  • macOS vs. Linux Differences
  • Quick Reference Card
← Back to 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.

Jun 12, 2026·5 min read·Yash Thakker
Claude CodeKeyboard ShortcutsDeveloper ToolsProductivityReference Guide
go deep
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.

Weekly digest3.5k readers

Catch up on AI

Curated AI updates on agents, skills, and MCP — delivered to your inbox. Unsubscribe anytime.

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

@ 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:

json
[
  {
    "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.

Yash Thakker

Written by

Yash Thakker

Yash is an AI expert with over 300K learners. Join his workshops →

Related posts

Jun 24, 2026

Claude Code Adds Itself as Git Co-Author: What It Means and How to Disable It [2026]

Claude Code automatically appends a "Co-Authored-By: Claude Opus <[email protected]>" trailer to every git commit it creates. The debate is live on X: some engineers call it dishonest to remove it, others call it inappropriate to credit a tool. Here is where it comes from, why other AI coding tools do the same thing, and the exact steps to turn it off — including a one-line settings.json fix and a Claude Code skill that prevents it permanently.

Jun 22, 2026

Steering Claude Code: CLAUDE.md, Skills, Hooks, Subagents, and Rules Explained

CLAUDE.md loads at session start and stays forever. Skills load only when invoked. Hooks run deterministically outside the context window. Subagents return only a summary to the main thread. Anthropic's new guide maps all seven instruction methods — here is the practical breakdown with decision rules for each.

Jun 12, 2026

Claude Code Context Window: What Happens When You Hit the Limit (and How to Fix It)

Claude Sonnet 4.6 has a 1 million token context window, but long sessions fill it faster than you expect. Learn what triggers the limit, how automatic compaction works, and the exact commands (/clear, /compact, --fork-session) to manage context like a pro.