explainx.ai0k
TrendingAI News TodayPathwaysSkills
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

follow on google

Add explainx.ai as a preferred source

corporate training

support@explainx.ai

get started

Find your pathTake Free Evaluation

community

Join the community

learn

mind: share how you thinkpathways — start freeworkshopsbootcampscoursescompare Explainxcertificationsmock testsexplainx universitycorporate traininglearn skills & mcp

discover

skillsmcp serversexplainx mcptoolsmdx readeragentsllmsdesignsdictionarypeopleagi trackerfelony benchranks

company

aboutvisionmissionteaminstructorsteach on explainxpartnershipscommunityhackathonscareers

content

daily AI newsstate of AI — live resultsblogreleasespromptsgeneratorsresource libraryfor LLMsexplainx.ai kids

solutions

all solutionsdeveloper upskillingmarketing upskillingproduct manager upskillingleadership upskilling

newsletter · weekly

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

supportcontactprivacytermsdata rightshow we create contentsubmission guidelines

© 2026 AISOLO Technologies Pvt Ltd

explainx.ai

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
  • A shortcut is interpreted by several layers
  • Stopping an operation does not undo its effects
  • Keep your first customization small
  • Use history as a draft, then inspect it
  • A five-minute practice session
← Back to blog

explainx / blog

Claude Code Keyboard Shortcuts: The Complete Reference (2026)

Claude Code, Keyboard Shortcuts, Developer Tools, Productivity, Reference Guide

Part of Claude Code

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

Jun 12, 2026·9 min read·Yash Thakker
add explainx.ai
go deep
Claude Code Keyboard Shortcuts: The Complete Reference (2026)

Update — September 24, 2026: New coverage — Will Claude Code kill plan mode?.

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.6k readers

Catch up on AI

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

Input & Navigation Shortcuts

Claude Code keyboard shortcuts diagram: a few glowing labeled keys highlighted on a dimmed keyboardClaude Code keyboard shortcuts diagram: a few glowing labeled keys highlighted on a dimmed keyboard

Shortcut behavior depends on the active context and terminal; consult the installed help panel before remapping keys.

table · 2 cols
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
EscapeInterrupt the current response or close a dialog; double Escape clears a draft
Ctrl+LClear the terminal display (conversation history is preserved)

Interrupting Claude During Tool Execution

Press Ctrl+C to interrupt a running operation. When nothing is running, the first press clears input and a subsequent press can exit the session. Escape can also interrupt the response or close the active dialog. Read the visible prompt before repeating a key.

Interruption preserves work already done; review files and external operations before starting again. The official interactive reference documents these context-dependent controls.


Multi-Line Input

table · 2 cols
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.

table · 2 cols
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.

table · 2 cols
SyntaxEffect
@filename.tsAttach a file by name (searches project root)
@/path/to/fileAttach a file by absolute or relative path
A URL in your requestAsk the agent to fetch the page; this is separate from file autocomplete
@ (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.

table · 2 cols
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.

Example: change one binding in the Chat context

The current configuration uses context blocks and namespaced actions:

json
{
  "bindings": [
    {
      "context": "Chat",
      "bindings": {
        "ctrl+e": "chat:externalEditor"
      }
    }
  ]
}

This example assigns a shortcut to the external prompt editor. Consult the official action list before changing submit, newline, or dialog behavior. Some controls are reserved, and the terminal may intercept a combination before Claude Code receives it.


macOS vs. Linux Differences

table · 3 cols
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

table · 3 cols
CategoryShortcut / CommandEffect
SubmitEnterSend message
NewlineShift+EnterAdd line in prompt
HistoryUp / Down ArrowNavigate history
InterruptCtrl+CStop Claude
Draft resetEscape twiceClear draft; empty input can open rewind
Clear displayCtrl+LClear terminal (not history)
Close / interruptEscapeContext-dependent cancellation
Shell command! <command>Run shell inline
Attach file@filenameAdd file context
Fetch URLURL in requestAsk for web context explicitly
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.

Update — September 11, 2026: Claude Code desktop also shipped flexible pane pop-out and a persistent /diff pane (scroll, click, real-time updates) — layout + review beyond keyboard shortcuts: flexible panes + /diff. Full command map: slash commands reference.

A shortcut is interpreted by several layers

The key you press passes through the operating system, terminal emulator, and sometimes a multiplexer before Claude Code receives it. That is why a shortcut can work in a standalone terminal but fail inside an editor terminal. Diagnose the layer rather than repeatedly changing Claude Code settings.

Begin with a harmless prompt draft. Type two short lines, move between them, and try the newline method you intend to use. Do not use a shell command as the test text: accidental submission should produce an ordinary conversation, not an operation on your project. After the draft behaves correctly, try history recall with another harmless message.

If the terminal opens a menu, copies text, or changes tabs, it consumed the shortcut before the application received it. Check that terminal's key mappings. If the application receives the key but performs the wrong action, inspect custom bindings and the active context. A confirmation dialog and the main prompt are different contexts, so success in one does not establish behavior in the other.

The official interactive-mode reference documents terminal-dependent multiline input. When Shift+Enter is unavailable, try Ctrl+J or the backslash followed by Enter method. Keep one fallback written down for remote sessions where you cannot change the terminal configuration.

Stopping an operation does not undo its effects

Treat an interruption as a change in execution, not a rollback. If an agent has already written a file, started a process, or called an external service, stopping the conversation does not automatically reverse that action. The useful follow-up is to inspect what completed and decide what should happen next.

For a code-editing task, review the diff after interrupting. Ask the agent to describe the files it changed and which checks ran. For a long command, inspect whether the process is still running before starting a replacement. Otherwise the second attempt can compete with the first or make the resulting logs harder to interpret.

An interruption also changes the context of your next prompt. "Continue" can be ambiguous after you have rejected part of a plan. State the intended correction explicitly: preserve the CSS changes, stop editing the database layer, and inspect the failing build before doing more work. Keyboard fluency is useful when paired with a clear next instruction.

Keep your first customization small

Back up the existing keybindings file before editing it. Change one nonessential action first, then confirm that the normal submit and interrupt behavior still works. A sweeping remap creates several possible causes when the next key behaves unexpectedly.

Use the action identifiers and contexts in the official keybinding reference. The configuration is an object containing binding blocks, and actions use names such as chat:submit and chat:newline. A short action name copied from another terminal application's configuration is not interchangeable.

If you share a customization with teammates, include the terminal and operating system you used, the purpose of the change, and the original binding. A teammate should be able to restore the default without reverse-engineering your entire configuration. Avoid making personal typing preferences a repository requirement when they do not affect the project's output.

Use history as a draft, then inspect it

History recall is convenient for repeated checks, but the old prompt may name a different file, branch, or destination. Read it before submitting. This matters especially when you reuse a request that included deployment, deletion, or publication instructions.

A better reusable prompt contains the stable intent and asks the agent to identify the current target. For example, "Inspect the current diff and explain the unresolved build error" is easier to reuse than a message naming a temporary branch from last week's incident. Store longer task instructions in a project document when they need review and versioning.

For file references, be deliberate about scope. Attaching a single relevant source file often gives a clearer answer than attaching an entire directory. When a response misses an important dependency, add that dependency and explain its relationship to the original file. More context helps only if it is the context the question actually needs.

A five-minute practice session

Create an ordinary prompt, add a second line without submitting, move to the start and end of a line, and correct one word. Recall a previous harmless message and edit its target before sending it. Open the command menu and inspect the commands your installation actually exposes.

Then ask a small explanatory question and interrupt the response. Check that the conversation remains usable, and ask a follow-up that states what you want changed. Finish by opening your custom configuration and identifying how to remove your trial binding. Those exercises teach recovery as well as speed, which is what makes a shortcut reference useful during real work.

Spotted something out of date? Let us know.
Yash Thakker

Written by

Yash Thakker

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

View Yash Thakker in People in AI →

Related posts

Sep 9, 2026

i-have-adhd: The 31K-Star Skill That Stops Claude Code Burying the Answer

i-have-adhd is an open-source skill that rewrites how coding agents format responses — action first, steps numbered, no "Hope this helps!" It has 31.2k GitHub stars, 36 contributors, and ships for Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Kimi, Qwen, and Antigravity. Here's what it actually changes, and what it can't.

Aug 27, 2026

Claude Code Now Drafts Your Bug Reports — Here's What It Sends

On August 27, 2026, @ClaudeDevs announced that Claude Code now writes its own feedback reports — when a tool keeps failing, when Claude notices it made a mistake, or when you call it out. Drafts sit in a local queue at ~/.claude/feedback/drafts/ until you press send. Here's the exact report structure, the data it carries, the rate-limit answer, and the feedbackDrafts setting that turns it off.

Aug 20, 2026

Claude Code Ships a Concise Output Style to Cut the Rambling

Anthropic shipped a built-in "Concise" output style for Claude Code on August 20, 2026 — a direct response to years of complaints about Lord-of-the-Rings-length status updates. Here's what it actually changes, the /config-vs-global gotcha that's already tripping people up, and why Claude Code's own creator is calling it a temporary fix.