← All posts

Claude Code Keyboard Shortcuts: Cheat Sheet for 2026

Claude Code keyboard shortcuts cheat sheet: Esc, Shift+Tab, Ctrl+R, Ctrl+G, multiline input, vim mode, prefix keys and how to customize keybindings.

The Claude Code keyboard shortcuts you will use most are Esc to stop Claude mid-turn, Esc Esc to clear your draft or open the rewind menu, Shift+Tab to cycle permission modes, Ctrl+R to search prompt history, Ctrl+O to open the transcript viewer, Ctrl+G to edit your prompt in a real editor, Ctrl+B to background a running task, and Shift+Enter (or \ then Enter) for a new line. Press ? on an empty prompt to see the shortcut panel inside Claude Code itself. Below is the full cheat sheet for 2026, grouped by what you are trying to do.

Before you start: two macOS gotchas

Option key shortcuts need "Option as Meta". Shortcuts like Alt+B, Alt+F and Alt+Y only work on macOS if your terminal sends Option as Meta. Each terminal has its own setting for this.

Shift+Enter is native in some terminals, not all. Claude Code lists iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal as working out of the box. For VS Code, Cursor, Alacritty, Zed and a few others, run /terminal-setup to install the binding. Ctrl+J and \ followed by Enter work everywhere with no setup.

Session control
Shortcut What it does
Esc Stop the current response or tool call so you can redirect. Claude keeps the work done so far
Esc Esc With text in the prompt, clear it (Up brings it back). With an empty prompt, open the rewind menu
Ctrl+C Interrupt. If nothing is running, first press clears input, second press exits
Ctrl+D Exit, after a confirmation press
Shift+Tab Cycle permission modes: Manual, accept edits, plan, and auto when available
Ctrl+B Send running Bash commands and agents to the background. Inside tmux, press it twice
Ctrl+T Show or hide Claude's task checklist
Ctrl+O Toggle the transcript viewer with full tool output
Ctrl+L Redraw the screen if the display gets garbled
Ctrl+Z Suspend Claude Code to your shell (Unix). Run fg to return

Shift+Tab is the one to learn first. It is how you move into plan mode before a risky change and back out again, and the status bar always shows which mode you are in.

Prompt input and history
Shortcut What it does
Ctrl+R Reverse search through previous prompts
Up / Down Move within a multiline prompt, then through history
Ctrl+G or Ctrl+X Ctrl+E Open the prompt in your default text editor
Ctrl+S Stash the current prompt; press again on an empty prompt to restore it
Ctrl+V (Cmd+V in iTerm2) Paste an image from the clipboard as an [Image #N] chip
Tab Accept an autocomplete suggestion
Ctrl+Enter Send queued messages now
Ctrl+_ Undo the last input edit

Ctrl+G is underrated. Long prompts with pasted logs or step lists are much easier to write in your editor than in a single input line, and the same shortcut opens a plan for editing when Claude shows one in plan mode.

Ctrl+S is the other quiet winner: you are halfway through a long prompt, need to ask something quick first, stash it, ask, then restore.

Text editing

These follow readline conventions, so they will feel familiar from bash and zsh.

Shortcut What it does
Ctrl+A / Ctrl+E Start / end of the current line
Ctrl+K Delete to end of line
Ctrl+U Delete to start of line (Cmd+Backspace maps here in iTerm2 and Terminal.app)
Ctrl+W Delete back to the previous whitespace, so one press removes a whole path
Ctrl+Y Paste the last deleted text
Alt+Y After Ctrl+Y, cycle older deleted text
Alt+B / Alt+F Back / forward one word
Alt+D Delete to end of word
Multiline input
Method Works where
\ then Enter Every terminal
Ctrl+J Every terminal, no configuration
Shift+Enter Natively in the terminals listed above; others via /terminal-setup
Option+Enter macOS, with Option as Meta enabled
Paste Pasted blocks keep their newlines
Prefix keys
Type this first What happens
/ Command and skill menu
! Shell mode: runs the command directly and adds the output to the session
@ File path autocomplete
? (empty prompt) Toggle the shortcut help panel

Shell mode is worth a habit. !git status puts the output in front of Claude without asking Claude to run it.

Model and thinking
Shortcut What it does
Option+P (Alt+P) Switch model without clearing your prompt
Option+T (Alt+T) Toggle extended thinking, on models where it can be toggled
Option+O (Alt+O) Toggle fast mode
Vim mode

Turn it on with /config and Editor mode. The old /vim command was removed. You get the usual NORMAL mode motions (h j k l, w, b, e, 0, $, gg, G, f{char}) and insert commands (i, a, A, o, O). If you use a jj escape, set vimInsertModeRemaps in your user settings.

Customizing shortcuts

Run /keybindings to open ~/.claude/keybindings.json and rebind actions, including chord bindings. The readline-style text editing shortcuts above cannot be remapped there.

Shortcuts and your terminal

Claude Code shortcuts only work if your terminal passes the keys through. That is why Option as Meta and Shift+Enter behave differently across apps, and why tmux users press Ctrl+B twice. If you run Claude Code inside tmux, our MOLTamp tmux power-user setup covers prefix conflicts.

Your terminal also adds its own layer: tab switching, splits, search. MOLTamp, a skinnable terminal shell for Claude Code, has its own set covered in MOLTamp keyboard shortcuts every dev should know. For a side-by-side of terminals for this workflow, see the best terminal for Claude Code, and for more habits beyond shortcuts, Claude Code tips and tricks.

Verdict

You do not need the whole table. Learn Esc, Esc Esc, Shift+Tab, Ctrl+R, Ctrl+G and Ctrl+B this week, and set up Shift+Enter or Ctrl+J for newlines. That covers stopping Claude, undoing, switching modes, finding old prompts, writing long prompts, and keeping work moving in the background. Press ? on an empty prompt whenever you forget the rest.

FAQ

How do I see Claude Code keyboard shortcuts inside the app? Press ? with the prompt empty to toggle the shortcut help panel. Typing ? when the prompt already has text just inserts the character.

How do I add a new line in Claude Code without sending? Type \ then Enter, or press Ctrl+J. Both work in every terminal. Shift+Enter works natively in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal; run /terminal-setup for others such as VS Code.

What does pressing Esc twice do in Claude Code? If the prompt has text, it clears the draft and saves it to history so Up recalls it. If the prompt is empty, it opens the rewind menu, where you can restore code and conversation from an earlier point.

How do I switch to plan mode with the keyboard? Press Shift+Tab to cycle permission modes until the status bar shows plan mode. Press it again to leave.

Can I change Claude Code keyboard shortcuts? Yes. Run /keybindings to edit ~/.claude/keybindings.json. The readline-style text editing shortcuts, such as Ctrl+W and Alt+B, are not remappable there.


A quick honest note: MOLTamp is free to use with every feature working. A one-time $10 license removes a recurring popup and unlocks community skin uploads. If you want your Claude Code tabs, skins and shortcuts in one place, download MOLTamp.