Claude Code Keyboard Shortcuts: The Ones Worth Learning (Desktop App and Terminal)

David IyaDavid Iya October 16, 2026 7 min read

Claude Code keyboard shortcuts: the short answer

Claude Code keyboard shortcuts depend on where you run it. The desktop app has its own set, built around sessions and panes, and you can see all of them with Cmd+/ on macOS or Ctrl+/ on Windows. The terminal version has a different set, built around the prompt, and typing ? on an empty prompt shows them. In both, Esc stops Claude mid-response, which is the single shortcut I would learn before any other.

You do not need to memorize a cheat sheet. Most of the value is in about five keys per surface, and the rest you pick up when you need them. Below are the ones I would learn first, taken from Anthropic's own Claude Code docs, with the desktop app first because that is where I point most people starting out.

Desktop app shortcuts worth learning

These apply to the Code tab in the Claude Code desktop app. On Windows, swap Cmd for Ctrl. Session cycling, the terminal toggle and the view mode toggle use Ctrl on both platforms.

Claude Code desktop app shortcuts, from Anthropic's desktop docs (macOS shown)

ShortcutWhat it does
Cmd+/Show every keyboard shortcut
EscStop Claude's response
Cmd+NStart a new session
Ctrl+Tab / Ctrl+Shift+TabNext or previous session
Cmd+Shift+DToggle the diff pane
Cmd+Shift+BToggle the Browser pane
Ctrl+`Toggle the terminal pane
Cmd+;Open a side chat
Cmd+Shift+MOpen the permission mode menu
Cmd+Shift+IOpen the model menu
Cmd+Shift+EOpen the effort menu

My pick for the first week: Esc, Cmd+Shift+D and Cmd+Shift+M. Esc lets you stop Claude the moment it heads the wrong way instead of waiting for it to finish. The diff pane is where you review what changed before you trust it. And the permission mode menu is how you move between asking before every edit and letting Claude work, which permission modes explained covers in full.

The side chat (Cmd+;, or typing /btw) is the underrated one. It can read the main conversation up to that point, so you can ask a quick question without derailing the task Claude is in the middle of.

Terminal shortcuts worth learning

If you run Claude Code in a terminal or an editor's terminal, these are the ones I would learn first. Type ? on an empty prompt any time to see the full list.

Claude Code terminal shortcuts, from Anthropic's interactive mode docs

ShortcutWhat it does
EscStop Claude mid-turn so you can redirect it. Claude keeps the work done so far
Esc Esc (empty prompt)Open the rewind menu to go back to an earlier point
Shift+TabCycle permission modes, including plan mode
Shift+Enter or Ctrl+JNew line without sending
Ctrl+GOpen your prompt in your default text editor
Ctrl+VPaste an image from the clipboard
Ctrl+RSearch your previous prompts
Ctrl+OToggle the transcript viewer to see tool calls in detail
Ctrl+BSend a running command or agent to the background
Ctrl+SStash the prompt you are typing, then restore it later
Option+P (macOS) or Alt+PSwitch model without clearing your prompt
Ctrl+CInterrupt, or clear the input. Pressed again on an empty prompt, it exits

The two I see beginners miss are Shift+Tab and Esc Esc. Shift+Tab is the fastest way into plan mode, which is where I start anything bigger than a small fix. Esc twice on an empty prompt opens the rewind menu, so a bad turn is not a disaster. Checkpoints and rewind explains what it can and cannot undo.

Shift+Enter works out of the box in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal, according to the docs. If it sends your prompt instead, use Ctrl+J, which works in any terminal, or type a backslash and then press Enter.

The prefixes that act like shortcuts

Three characters at the start of a prompt in the terminal do as much as any key combination:

  • / opens the command and skill menu. Claude Code slash commands covers the ones that matter.
  • @ starts file path autocomplete, so you can point Claude at an exact file instead of describing it.
  • ! switches to shell mode. Run a command like your test suite, and its output goes into the session so Claude can respond to it.

How to change Claude Code keyboard shortcuts

In the terminal version, run /keybindings. It creates or opens ~/.claude/keybindings.json, and Claude Code picks up changes without a restart. The file is a list of blocks, each with a context (like Chat, Global or Transcript) and a map of keys to actions. Setting a key to null unbinds it. This example moves the external editor to Ctrl+E and frees up Ctrl+S:

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

A few keys are reserved and cannot be rebound: Ctrl+C, Ctrl+D, Ctrl+M (always Enter), Ctrl+[ (always Escape), Ctrl+I (always Tab) and Ctrl+H. The basic text editing keys, like Ctrl+A, Ctrl+E, Ctrl+K and Ctrl+W in the prompt, also have no actions in the keybindings file, so you cannot remap them there.

If you would rather have Vim keys in the prompt, that is a separate setting: /config, then Editor mode. Claude Code with Vim and Neovim has the details.

Which shortcuts should you learn first?

My take: learn three, use them for a week, then add more. If you are in the desktop app, that is Esc, Cmd+Shift+D and Cmd+Shift+M. If you are in the terminal, it is Esc, Shift+Tab and Esc Esc. All of them are about control: stopping Claude, seeing what it changed and deciding how much it is allowed to do without asking. Speed shortcuts like model switching are nice later. Control shortcuts save you from bad edits on day one.

If you are new to all of this, start in the desktop app, where the shortcuts list is one key away and the panes do a lot of the work for you. Claude Code tips for beginners and Claude Code day one setup cover the rest of the first hour.

Free Claude Code drops, straight to your inbox

Short, practical drops on skills, MCP, agents, prompts, and more. No spam, unsubscribe anytime.

Frequently asked questions

How do I see all keyboard shortcuts in Claude Code?

In the desktop app, press Cmd+/ on macOS or Ctrl+/ on Windows. In the terminal, type ? on an empty prompt to toggle the shortcut help panel.

How do I stop Claude Code while it is working?

Press Esc. Claude stops the current response or tool call and keeps the work done so far, so you can redirect it. This works in both the desktop app and the terminal.

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

In the terminal, press Shift+Enter in terminals that support it, or Ctrl+J, which works in any terminal. You can also type a backslash and then press Enter.

How do I switch to plan mode with a shortcut?

In the terminal, press Shift+Tab to cycle permission modes until you reach plan mode. In the desktop app, Shift+Tab does not do this. Press Cmd+Shift+M on macOS or Ctrl+Shift+M on Windows to open the permission mode menu.

Can I change Claude Code keyboard shortcuts?

Yes, in the terminal version. Run /keybindings to open ~/.claude/keybindings.json and map keys to actions by context. Ctrl+C, Ctrl+D and a few other keys are reserved and cannot be rebound.

Last reviewed by David Iya on October 16, 2026

David Iya

Written by

David Iya

Forbes 30 Under 30 · Y Combinator

Keep reading

Claude CodeGetting Started

Claude Code Terminal Setup: Fix Shift+Enter, Notifications, tmux and Themes

Claude Code works in any terminal without setup, but a few things trip people up: Shift+Enter sending the prompt, Option-key shortcuts doing nothing on a Mac, no alert when Claude finishes, and tmux swallowing keys. Most of it is fixed by running /terminal-setup once or changing one setting. Here is how I would set up a terminal for Claude Code, symptom by symptom.

David Iya 7 min
Read article
Claude CodeGetting Started

Claude Code with Vim and Neovim: Vim Mode, Your Editor and the Split Setup

There is no official Claude Code plugin for Vim or Neovim, and you do not need one. Turn on vim editor mode so the Claude Code prompt uses the keys you already know, set your editor so Ctrl+G opens long prompts in Neovim, and run Claude Code next to your editor with Neovim set to reload the files Claude changes. Here is the setup, the settings to copy, and when I would use the desktop app instead.

David Iya 7 min
Read article

Ready to build it yourself?

Join Claude Code Club, the #1 community for learning claude code, for $9/month.

← Back to the blog