Skip to content

Keyboard Shortcuts Reference

Print this page, pin it next to your monitor, or bookmark it. These are the shortcuts that separate developers who are fast with AI tools from those who are constantly reaching for the mouse.

ShortcutAction
Cmd/Ctrl+IOpen/close Agent chat panel
Cmd/Ctrl+KInline edit (selection or cursor position)
Cmd/Ctrl+EBackground Agent
TabAccept autocomplete suggestion
Cmd/Ctrl+.Toggle mode (Agent/Ask)
Cmd/Ctrl+/Cycle between models
Cmd/Ctrl+EnterAccept all changes
Cmd/Ctrl+BackspaceReject all changes
EscapeCancel current operation
Cmd/Ctrl+Shift+PCommand palette
ActionWindows/LinuxmacOS
Open/close AI chatCtrl+ICmd+I
Open/close AI chat (alt)Ctrl+LCmd+L
Background AgentCtrl+ECmd+E
Toggle Agent/Ask modeCtrl+.Cmd+.
Cycle modelsCtrl+/Cmd+/
Cursor SettingsCtrl+Shift+JCmd+Shift+J
VS Code SettingsCtrl+,Cmd+,
Command PaletteCtrl+Shift+PCmd+Shift+P
ActionWindows/LinuxmacOS
Send messageEnterEnter
Force submit (override queue)Alt+EnterAlt+Enter
Cancel AI responseCtrl+Shift+BackspaceCmd+Shift+Backspace
Add selection to chatCtrl+Shift+LCmd+Shift+L
Paste as contextCtrl+VCmd+V
Paste to input (text only)Ctrl+Shift+VCmd+Shift+V
Accept all changesCtrl+EnterCmd+Enter
Reject all changesCtrl+BackspaceCmd+Backspace
Next messageTabTab
Previous messageShift+TabShift+Tab
Toggle modelCtrl+Alt+/Cmd+Alt+/
New chatCtrl+N or Ctrl+RCmd+N or Cmd+R
New chat tabCtrl+TCmd+T
Previous chatCtrl+[Cmd+[
Next chatCtrl+]Cmd+]
Close chatCtrl+WCmd+W
Exit input fieldEscapeEscape
ActionWindows/LinuxmacOS
Open inline editCtrl+KCmd+K
Toggle focus (code/prompt)Ctrl+Shift+KCmd+Shift+K
Submit editEnterEnter
Cancel editCtrl+Shift+BackspaceCmd+Shift+Backspace
Quick question about selectionAlt+EnterAlt+Enter
ActionWindows/LinuxmacOS
Reference symbols@@
Reference files##
Slash commands//
Add selection to chatCtrl+Shift+LCmd+Shift+L
Add selection to inline editCtrl+Shift+KCmd+Shift+K
Toggle reading strategyCtrl+MCmd+M
Accept next word (partial)Ctrl+RightCmd+Right
Search codebaseCtrl+EnterCmd+Enter
ActionWindows/LinuxmacOS
Accept full suggestionTabTab
Accept next wordCtrl+RightCmd+Right
Reject suggestionEscapeEscape
ActionWindows/LinuxmacOS
AI command generationCtrl+KCmd+K
Execute generated commandCtrl+EnterCmd+Enter
Accept commandEscapeEscape
ShortcutDescription
EscapeStop Claude’s current operation
Escape twiceShow message list / edit previous message
Ctrl+CCancel current input
Ctrl+DExit Claude Code session
Ctrl+LClear terminal screen (keeps conversation)
Up/DownNavigate command history
TabCommand and path completion
MethodShortcutNotes
Backslash escape\ + EnterWorks in all terminals
macOS defaultOption+EnterDefault on macOS
After setupShift+EnterRun /terminal-setup first
Paste modeDirect pasteFor code blocks and logs
PrefixAction
# at line startUpdate CLAUDE.md (prompts for file selection)
/ at line startOpen slash command menu
@ in messageInclude file contents

Enable with /vim or configure permanently in /config.

Mode switching:

CommandAction
EscapeEnter NORMAL mode
i / IInsert before cursor / at line start
a / AInsert after cursor / at line end
o / OOpen line below / above

Navigation (NORMAL mode):

CommandAction
h/j/k/lLeft / Down / Up / Right
w / e / bNext word / End of word / Previous word
0 / $ / ^Line start / Line end / First non-blank
gg / GInput start / Input end

Editing (NORMAL mode):

CommandAction
xDelete character
dd / DDelete line / Delete to end
dw / de / dbDelete word forward / to end / backward
cc / CChange line / Change to end
.Repeat last change
ShortcutDescription
EnterSubmit prompt
EscapeCancel current generation
Ctrl+CInterrupt / exit
Ctrl+LClear terminal screen
Up/DownNavigate command history
TabAutocomplete commands and paths
ActionShortcut
New taskN
Submit promptEnter or Cmd/Ctrl+Enter
Cancel taskEscape
View diffD
Accept changesA
Navigate tasksUp/Down or J/K
CommandDescription
/Show available commands
/modelSwitch model
/newStart new conversation
/compactSummarize conversation

macOS Users

  • Use Cmd instead of Ctrl for Cursor shortcuts
  • Claude Code image paste: Use Ctrl+V (not Cmd+V) — this catches many people
  • Terminal line breaks: Option+Enter by default in Claude Code
  • Run /terminal-setup in Claude Code for Shift+Enter support in iTerm2

Windows/Linux Users

  • Ctrl is the primary modifier everywhere
  • Some terminal emulators may capture shortcuts before they reach Claude Code
  • Windows Terminal and WSL both work with Claude Code natively
  • Check for conflicts with system-level shortcuts (especially in Linux desktop environments)
  1. Open Keyboard Shortcuts: Ctrl+R then Ctrl+S (or Cmd+R then Cmd+S)
  2. Search for the command you want to modify
  3. Click the pencil icon to edit
  4. Press your desired key combination
  5. Save

Example custom binding:

{
"key": "cmd+m",
"command": "cursor.generateGitCommitMessage"
}

Create shortcuts for frequently used prompts:

  1. Create the .claude/commands/ directory in your project
  2. Add markdown files — each file becomes a /command-name
  3. Use $ARGUMENTS for dynamic input

Example .claude/commands/review.md:

---
allowed-tools: [Read, Bash]
description: Review code for bugs and security issues
---
Review the following code for bugs, security vulnerabilities, and performance issues.
Focus on real problems, not style preferences. $ARGUMENTS

Usage: /review @src/auth.ts

  1. Cmd/Ctrl+I — Agent chat
  2. Cmd/Ctrl+K — Inline edit
  3. Tab — Accept suggestion
  4. Cmd/Ctrl+Shift+L — Add to chat
  5. Cmd/Ctrl+E — Background Agent
  6. @ — Reference symbols
  7. Cmd/Ctrl+/ — Switch models
  8. Cmd/Ctrl+Enter — Accept all
  9. Escape — Cancel
  10. Cmd/Ctrl+Shift+P — Command palette
  1. Escape — Stop Claude
  2. Escape twice — Edit message
  3. Up arrow — Previous command
  4. Tab — Complete command
  5. # — Update CLAUDE.md
  6. / — Slash commands
  7. @ — Reference files
  8. Ctrl+V — Paste images
  9. \ + Enter — New line
  10. Ctrl+D — Exit session
  1. Enter — Submit prompt
  2. Escape — Cancel generation
  3. Up/Down — Command history
  4. Tab — Autocomplete
  5. / — Slash commands
  6. Ctrl+C — Interrupt
  7. Ctrl+L — Clear screen
  8. N (App) — New task
  9. D (App) — View diff
  10. A (App) — Accept changes