# Claude Code keyboard shortcuts: the full list

The Claude Code shortcuts that matter most are Esc to stop Claude, Esc twice to rewind, Shift+Tab to change the permission mode, Shift+Enter or Ctrl+J for a new line, Ctrl+V to paste a screenshot, Ctrl+O to see every tool call, and ! at the start of a message to run a shell command yourself.

- Page: https://tecyfy.com/coding-agents/claude-code/shortcuts
- Guide: Claude Code (https://tecyfy.com/coding-agents/claude-code), from Anthropic's documentation (https://code.claude.com/docs/en/overview)

Most of Claude Code is typing, so a handful of keys save more time than any setting. This page has the ones worth learning on day 1, the ones that surprise people, and the full list to search.

## The 6 to learn first

| Key | What it does |
| --- | --- |
| **Esc** | Stops Claude at once. The work so far is kept, so you can redirect it. |
| **Esc Esc** | On an empty prompt, opens the rewind menu to go back to an earlier message, files included. |
| **Shift+Tab** | Cycles the permission mode: Manual, Accept edits, Plan, Auto. The current mode shows under the prompt. |
| **Shift+Enter** | A new line instead of sending. If it does not work in your terminal, use Ctrl+J. |
| **Ctrl+V** | Pastes a screenshot into your message (Alt+V on Windows). |
| **Ctrl+O** | Shows the full transcript: every tool Claude called and what came back. |

Esc is the one people find last and need most. You do not have to wait for a wrong approach to finish.

## Characters that change what a message does

The first character of a message decides how it is read:

- **`/`** opens the list of [commands and skills](/coding-agents/claude-code/commands).
- **`!`** runs the rest as a shell command, by you, not by Claude. `! npm test` runs your tests, shows the output and adds it to the conversation, and Claude answers it without a second prompt. Because you typed it, there is no permission prompt.
- **`@`** anywhere in a message suggests file paths. Picking one puts the file's contents into your message.
- **`?`** on an empty prompt shows the shortcuts.

## Talking while it works

You do not have to wait for a turn to finish. Type a message and press Enter while Claude is working, and it is queued. If Claude is in the middle of tool calls, it reads your message as soon as they finish, in the same turn. Press Up to take queued messages back and edit them, or Ctrl+Enter to send them at once.

Ctrl+B moves a long command, such as a dev server or a test run, to the background, so Claude can carry on while it runs.

## On a Mac: Option needs one setting

Shortcuts with Option (Option+P to switch model, Option+T for thinking, Alt+B and Alt+F to jump words) do nothing in most Mac terminals until you tell the terminal to send Option as Meta. In Terminal, turn on **Use Option as Meta key** in the profile's keyboard settings; in iTerm2, set the Option key to **Esc+**. Option+T works without it.

## Change a shortcut

Run `/keybindings` to open `~/.claude/keybindings.json`. Bindings are grouped by where they apply, such as `Chat` for the prompt or `Global` for everywhere. This moves "open in editor" to Ctrl+E and turns off Ctrl+S:

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

Changes apply as soon as you save. The text-editing keys, such as Ctrl+W and Alt+B, cannot be remapped.

## Every shortcut

Search by key or by what you want to do, such as "paste" or "new line". Keys can differ by terminal and system; the Mac uses Option where Windows and Linux use Alt.

| Shortcut | Group | What it does |
| --- | --- | --- |
| `Esc` | Control | Stops Claude mid-answer or mid-tool so you can redirect it. The work so far is kept. Also closes a dialog, and on a permission prompt it answers No. |
| `Esc Esc` | Control | With the prompt empty, opens the rewind menu to restore code and conversation to an earlier message. With text in the prompt, clears it instead (Up brings it back). |
| `Shift+Tab` | Control | Cycles the permission mode - Manual, Accept edits, Plan and, where available, Auto. Alt+M on some Windows setups. |
| `Ctrl+C` | Control | Interrupts what is running. With nothing running, the first press clears the prompt and a second press quits. |
| `Ctrl+D` | Control | Quits Claude Code when pressed twice quickly. With text in the prompt it deletes the character after the cursor. |
| `Ctrl+B` | Control | Moves a running command or subagent to the background so you can keep working. In tmux, press it twice. |
| `Ctrl+X Ctrl+K` | Control | Stops every background subagent in the session. Press twice within 3 seconds to confirm. |
| `Ctrl+Enter` | Control | Sends your queued messages now instead of waiting for the turn to end. Ctrl+X Ctrl+S does the same in terminals that do not pass Ctrl+Enter through. |
| `Option+P / Alt+P` | Control | Switches model without losing what you have typed. Option on a Mac, Alt on Windows and Linux. |
| `Option+T / Alt+T` | Control | Turns extended thinking on or off, on models where it can be switched. |
| `Option+O / Alt+O` | Control | Turns fast mode on or off. |
| `Ctrl+Z` | Control | Suspends Claude Code to your shell on Mac and Linux. Type fg to bring it back. |
| `Shift+Enter` | Input | Starts a new line without sending. Works as is in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal; /terminal-setup adds it elsewhere. |
| `Backslash + Enter` | Input | Starts a new line in any terminal. Type \ and press Enter. |
| `Ctrl+J` | Input | Starts a new line in any terminal, with no setup. |
| `Ctrl+G` | Input | Opens your prompt in your own text editor, for long prompts or editing a plan. Ctrl+X Ctrl+E does the same. |
| `Ctrl+V` | Input | Pastes an image from the clipboard into your message. Cmd+V in iTerm2, Alt+V on Windows and WSL. |
| `Ctrl+S` | Input | Puts what you have typed aside and clears the prompt. Press it again on an empty prompt to bring it back. |
| `Ctrl+R` | Input | Searches the prompts you typed before. Press it again for older matches, Tab to edit the match, Enter to send it. |
| `Up / Down` | Input | Moves through earlier prompts in this project. While messages are queued, Up from the first line takes them back to edit. |
| `Tab` | Input | Accepts the highlighted suggestion, such as a command or a file path. On a permission prompt, adds a comment to your answer. |
| `Ctrl+A` | Edit text | Moves to the start of the line. |
| `Ctrl+E` | Edit text | Moves to the end of the line. |
| `Ctrl+K` | Edit text | Deletes from the cursor to the end of the line, kept for Ctrl+Y. |
| `Ctrl+U` | Edit text | Deletes from the cursor to the start of the line, kept for Ctrl+Y. Cmd+Backspace does this in most Mac terminals. |
| `Ctrl+W` | Edit text | Deletes back to the previous space, so one press removes a whole path or --flag=value. |
| `Ctrl+Y` | Edit text | Pastes back the text you last deleted with Ctrl+K, Ctrl+U or Ctrl+W. |
| `Alt+B / Alt+F` | Edit text | Moves back or forward one word. On a Mac, set Option to act as Meta in your terminal first. |
| `Ctrl+_` | Edit text | Undoes your last edit to the prompt. |
| `/ (commands)` | Prefixes | At the start of a message, opens the menu of commands and skills. Type letters to filter. |
| `! (shell mode)` | Prefixes | Runs the rest as a shell command yourself, without Claude approving it, and adds the output to the conversation for Claude to answer. Example - ! npm test. |
| `@ (file mention)` | Prefixes | Suggests file paths as you type, and puts the file you pick into your message. |
| `? (help)` | Prefixes | On an empty prompt, shows the list of shortcuts. |
| `Ctrl+O` | Views | Opens the full transcript, with every tool call and its result, and the model used for each answer. |
| `Ctrl+T` | Views | Shows or hides Claude's task checklist. |
| `Ctrl+L` | Views | Redraws the screen if the display gets garbled. Your conversation is kept. |
| `Space (hold)` | Input | Dictates by voice while held, once voice dictation is on with /voice. |

## Questions

### How do I add a new line in Claude Code without sending?

Press Shift+Enter in terminals that support it (iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, Windows Terminal). Ctrl+J works in every terminal, and so does typing \ then Enter. Run /terminal-setup to add Shift+Enter to VS Code, Cursor, Alacritty or Zed.

### Why do the Option shortcuts not work on my Mac?

Most Mac terminals send Option as a special character, not as a key Claude Code can read. Turn on "Use Option as Meta key" in Terminal, or set Option to Esc+ in iTerm2, and shortcuts such as Option+P and Alt+B start working.

### How do I stop Claude Code without losing the work?

Press Esc. It stops the current answer or tool call and keeps what was done. Ctrl+C also interrupts, but pressed again on an empty prompt it quits.

### Can I change Claude Code's keyboard shortcuts?

Yes. Run /keybindings to open ~/.claude/keybindings.json, where you bind keys to actions or set a key to null to turn it off. Changes apply without a restart. The text-editing keys such as Ctrl+W cannot be changed.

## Sources

- [Interactive mode](https://code.claude.com/docs/en/interactive-mode)
- [Customize keyboard shortcuts](https://code.claude.com/docs/en/keybindings)
- [Configure your terminal](https://code.claude.com/docs/en/terminal-config)
