Claude Code Keyboard Shortcuts
Claude Code has two shortcut contexts: shortcuts inside the interactive REPL (terminal), and shortcuts in the VSCode extension (sidebar + inline). This page covers both.
Mac vs Linux/Windows: On Mac, use ⌘ where these tables show Ctrl. The REPL shortcuts are the same across all platforms.
REPL Input Shortcuts
These shortcuts work in the Claude Code terminal REPL (the session after running claude).
| Shortcut | Action |
|---|---|
| Enter | Submit message / confirm action |
| Shift+Enter | New line in multi-line input (does NOT submit) |
| Ctrl+C | Cancel current input or interrupt running task |
| Ctrl+D | Exit the REPL session |
| ↑ / ↓ | Navigate input history (previous/next messages) |
| Ctrl+R | Fuzzy search input history (like bash reverse-i-search) |
| Ctrl+L | Clear terminal screen (session context preserved) |
| Tab | Autocomplete slash commands and file paths |
| Ctrl+A | Move cursor to start of line |
| Ctrl+E | Move cursor to end of line |
| Ctrl+K | Delete from cursor to end of line |
| Ctrl+U | Delete entire line |
| Ctrl+W | Delete previous word |
| Ctrl+Z | Background the REPL (use fg to return) |
| Esc | Cancel current suggestion / close autocomplete |
During Task Execution
When Claude Code is actively running a task (reading files, making edits):
| Shortcut | Action |
|---|---|
| Ctrl+C | Interrupt the task. Claude will stop mid-action and show what was done so far. |
| y then Enter | Approve a proposed change (when Claude shows a diff and asks "Apply?"). |
| n then Enter | Reject a proposed change. Claude will ask for alternative instructions. |
| e then Enter | Open the proposed change in your editor before deciding. |
| a then Enter | Approve all remaining changes in this task (skip individual confirmations). |
| q then Enter | Quit the current task, reject all pending changes. |
Confirmation shortcuts: When Claude shows a confirmation prompt, you usually only need to type the first letter and press Enter. Claude accepts
yes, y, no, n, edit, e, all, a.VSCode Extension Shortcuts
After installing the Claude Code VSCode extension. These are the defaults — all are rebindable via keybindings.json.
| Shortcut | Action |
|---|---|
| Ctrl+Shift+C | Open Claude Code panel (sidebar) |
| Ctrl+Shift+A | Send active file to Claude ("edit this file") |
| Ctrl+Shift+R | Review active file |
| Ctrl+Shift+E | Explain selected code |
| Ctrl+Shift+F | Fix selected code / error under cursor |
| Ctrl+` | Toggle integrated terminal (standard VSCode) |
| Ctrl+Shift+D | Show diff of Claude's last edit |
| Ctrl+Z | Undo Claude's last edit (standard undo, works with extension edits) |
| Ctrl+Shift+P | Command Palette — search "Claude" to see all extension commands |
Custom Keybindings (VSCode)
Add to your keybindings.json (Ctrl+Shift+P → "Open Keyboard Shortcuts JSON"):
[
// Send active file to Claude for editing
{
"key": "ctrl+shift+a",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": "claude edit ${file}\n" }
},
// Review active file
{
"key": "ctrl+shift+r",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": "claude review ${file}\n" }
},
// Fix current file (on test failure or lint error)
{
"key": "ctrl+shift+f",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": "claude /fix\n" }
},
// Launch Claude in terminal
{
"key": "ctrl+alt+c",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": "claude\n" }
}
]
Terminal Multiplexer Tips (tmux / screen)
Many developers run Claude Code in tmux. Key combinations to be aware of:
- Ctrl+C inside tmux sends to the active pane — this interrupts Claude's running task as expected
- To send Ctrl+C to tmux itself (not Claude), use your tmux prefix key first
- Claude Code works well in split panes: one pane for the REPL, one for watching test output
- Use
tmux new -s claudeto create a named session that persists across SSH disconnects