Session Control

Action Shortcut
Start a Claude Code session in current directory claudeclaudeclaude
Cancel current request or input EscEscEsc
Interrupt running operation CtrlCCtrlCCtrlC
Exit Claude Code CtrlDCtrlDCtrlD
Exit Claude Code (alternate) /exit/exit/exit
Clear the terminal screen CtrlLCtrlLCtrlL
Resume the most recent session claude--continueclaude--continueclaude--continue
Pick a past session to resume claude--resumeclaude--resumeclaude--resume

Input & Editing

Action Shortcut
Submit message EnterEnterEnter
Insert a new line in your message ShiftEnterShiftEnterShiftEnter
Insert a new line (alternate) \Enter\Enter\Enter
Move cursor to start of line CtrlACtrlACtrlA
Move cursor to end of line CtrlECtrlECtrlE
Move cursor one word backward OptionLeftAltLeftAltLeft
Move cursor one word forward OptionRightAltRightAltRight
Delete word before cursor CtrlWCtrlWCtrlW
Delete from cursor to start of line CtrlUCtrlUCtrlU
Delete from cursor to end of line CtrlKCtrlKCtrlK
Open input in external editor ($EDITOR) CtrlXCtrlECtrlXCtrlECtrlXCtrlE

History & Autocomplete

Action Shortcut
Previous message in history UpUpUp
Next message in history DownDownDown
Reverse-search through history CtrlRCtrlRCtrlR
Autocomplete slash command or file path TabTabTab
Cycle backward through completions ShiftTabShiftTabShiftTab

Plan Mode

Action Shortcut
Toggle plan mode on or off ShiftTabShiftTabShiftTab
Approve plan and start execution EnterEnterEnter
Reject plan and keep iterating EscEscEsc

Slash Commands

Action Shortcut
Show all available slash commands /help/help/help
Clear the current conversation /clear/clear/clear
Summarize conversation to free up context /compact/compact/compact
Initialize a CLAUDE.md for this project /init/init/init
View or edit project and user memory /memory/memory/memory
Switch Claude models /model/model/model
Open settings and preferences /config/config/config
Manage subagents /agents/agents/agents
Manage MCP servers and connectors /mcp/mcp/mcp
Give Claude access to another directory /add-dir/add-dir/add-dir
Show token cost for current session /cost/cost/cost
Resume a previous session /resume/resume/resume
Review code or a recent diff /review/review/review
Pull review comments from a GitHub PR /pr-comments/pr-comments/pr-comments
Sign out of your Anthropic account /logout/logout/logout
Create or open the keybindings config file /keybindings/keybindings/keybindings

File & Code References

Action Shortcut
Reference a file or directory in your message @path/to/file@path/to/file@path/to/file
Run a shell command directly (bash mode) !command!command!command
Add a note to memory (project or user) #your note#your note#your note
Paste an image from clipboard CmdVCtrlVCtrlV
Drag and drop a file into the terminal Drag file onto terminalDrag file onto terminalDrag file onto terminal

Tool Permissions

Action Shortcut
Approve a single tool call EnterEnterEnter
Approve and remember choice for this session AAA
Reject the proposed tool call EscEscEsc
Bypass all permission prompts (use with care) claude--dangerously-skip-permissionsclaude--dangerously-skip-permissionsclaude--dangerously-skip-permissions
No shortcuts found. Try a different search term.

Frequently Asked Questions

How do I enter plan mode in Claude Code?
Press Shift+Tab from the input prompt to toggle plan mode on or off. In plan mode Claude proposes a step-by-step plan before touching files. Press Enter to approve and execute, or Esc to reject and keep iterating on the plan.
How do I reference a file in Claude Code?
Type @ followed by the path — for example @src/app.tsx or @README.md. Claude Code expands the reference and reads the file before responding. Tab completes paths the same way your shell does.
What does the # prefix do in Claude Code?
Lines that start with # are added to memory instead of being sent as a normal message. Claude Code asks whether to save the note to project memory (CLAUDE.md in the repo) or user memory (your personal CLAUDE.md in ~/.claude). Use # for facts you want remembered across turns, like coding conventions or commands.
How do I run a shell command without leaving Claude Code?
Start the line with ! to run it in bash mode — for example !ls or !git status. The command runs in the same working directory as your session and the output is shared back to Claude, so you can ask follow-up questions about it.
How do I exit Claude Code in the terminal?
Press Ctrl+D, type /exit, or type /quit. If a request is running, press Esc once to cancel it, or Ctrl+C to interrupt the underlying process. Sessions are saved automatically — use claude --continue to pick up where you left off.
How do I interrupt or stop Claude Code mid-task?
Press Esc once to cancel the current request or stop Claude while it's working — this keeps you in the session. Ctrl+C interrupts the underlying process, and pressing Ctrl+C again (or Ctrl+D) exits Claude Code entirely. So Esc to stop a task, Ctrl+D or /exit to leave.
How do I add a new line in Claude Code without sending?
Press Shift+Enter to add a new line without submitting. If your terminal sends the message instead (some do not distinguish Shift+Enter from Enter), type a backslash \ and then press Enter, which works everywhere. Enter on its own always sends.
How do I free up context without losing the session?
Type /compact. Claude Code summarizes the conversation so far and keeps the summary in context, freeing tokens for new work. Use /clear if you want a completely fresh slate instead.
Is Claude Code different from the Claude desktop app?
Yes. Claude Code is a command-line tool for agentic coding tasks — running in your terminal, reading and editing files in your project, executing shell commands, and using MCP tools. The Claude desktop and web apps are general-purpose chat interfaces with their own keyboard shortcuts.
How do I change Claude Code's keyboard shortcuts?
Run /keybindings, which creates or opens ~/.claude/keybindings.json. The file holds a bindings array, and each block names a context plus a map of keystrokes to actions — for example binding ctrl+e to chat:externalEditor in the Chat context. Changes are detected automatically and applied without restarting Claude Code. Contexts include Global, Chat, Autocomplete, Settings, Confirmation, Tabs, Help, Transcript, HistorySearch and Task, among others.
Which Claude Code shortcuts cannot be rebound?
Four. Ctrl+C and Ctrl+D are hardcoded interrupt and exit. Ctrl+M cannot be rebound because terminals send it as an identical byte to Enter — both are carriage return, so they are indistinguishable. And Caps Lock is never delivered to terminal applications at all. Everything else is fair game.
Why doesn't my Cmd or Super keybinding work in Claude Code?
Because most terminals never send that modifier. The cmd group — cmd, command, super, win — is only detected in terminals that report the Super modifier, such as those supporting the Kitty keyboard protocol or xterm's modifyOtherKeys mode. For a binding that works everywhere, use ctrl or meta instead. Note meta maps to Alt on Windows and Linux and to Option on macOS.
How do I unbind a default Claude Code shortcut?
Set the action to null instead of a string. There is a catch with chords: a chord in any active context keeps its prefix reserved, so to reclaim a prefix as a single key you must unbind every chord that uses it, in each context that defines it. The default Ctrl+X family spans two contexts — ctrl+x ctrl+k and ctrl+x ctrl+e in Chat, and ctrl+x ctrl+b in Task — so freeing ctrl+x means unbinding all three.
Do Claude Code keybindings conflict with tmux or screen?
They can, and the docs name three. Ctrl+B is the tmux prefix, so you press it twice to send it through. Ctrl+A is the GNU screen prefix. Ctrl+Z is the Unix suspend signal. Claude Code validates your keybindings file on load and warns about reserved-shortcut conflicts, multiplexer conflicts, invalid context names, duplicate bindings and parse errors — start it with --debug to see the details.