Kipt

Claude Code keyboard shortcuts: the full reference

All Claude Code keyboard shortcuts in one place: general controls, text editing, multiline input, vim mode, Option as Meta on macOS and custom keybindings.

By the Kipt team · Updated 24 October 2026

What are the Claude Code keyboard shortcuts?

Claude Code keyboard shortcuts are the keys the CLI responds to in a session: Esc to interrupt, Esc Esc to rewind, Shift+Tab to cycle permission modes, Ctrl+O for the transcript, Ctrl+R for history search, Ctrl+J for a new line, plus readline-style editing keys. Type ? on an empty prompt to see them in the app, and run /keybindings to change them.

This page collects the full list from the official interactive mode reference and the keybindings docs, grouped by what you are trying to do. For commands, flags and settings on one page, see the Claude Code cheat sheet.

Shortcuts can vary by platform and terminal. On macOS, the Alt shortcuts below need Option set up as Meta in your terminal, covered further down.

Which shortcuts control a session?

These are the general controls you will use most.

Shortcut What it does
Esc Interrupt Claude mid-turn and keep the work so far, or close a dialog
Esc Esc Clear the input draft, or open the rewind menu when the input is empty
Ctrl+C Interrupt; with nothing running, first press clears input, second exits
Ctrl+D Exit (press twice within 800ms); deletes the next character when the prompt has text
Shift+Tab Cycle permission modes (Alt+M on Windows without VT input mode)
Ctrl+O Toggle the transcript viewer with full tool output
Ctrl+R Reverse search through prompt history
Ctrl+G or Ctrl+X Ctrl+E Open the prompt in your default text editor
Ctrl+L Redraw the screen, keeping input and history
Ctrl+V Paste an image from the clipboard (Cmd+V in iTerm2, Alt+V on Windows and WSL)
Ctrl+B Move a running Bash command or agent to the background (press twice in tmux)
Ctrl+T Show or hide Claude's to-do checklist
Ctrl+S Stash the current prompt, press again on an empty prompt to restore it
Ctrl+Z Suspend Claude Code (Unix only); run fg to resume
Ctrl+X Ctrl+K Stop all background subagents (press twice within 3 seconds)
Ctrl+Enter or Ctrl+X Ctrl+S Send queued messages now
Option+P / Alt+P Switch model without clearing your prompt
Option+T / Alt+T Toggle extended thinking
Option+O / Alt+O Toggle fast mode
Up / Down or Ctrl+P / Ctrl+N Move the cursor in multiline input, then step through history
Tab Accept an autocomplete suggestion

Three of these are worth learning first. Esc stops Claude without losing what it has done, so you can redirect it. Esc Esc on an empty prompt opens the rewind menu, explained in our Claude Code checkpoints guide. Ctrl+B keeps a long test run or dev server going while you keep talking to Claude.

Per the docs, the thinking toggle has no effect on models that always use extended thinking, and it works on macOS without the Option as Meta change.

Which shortcuts edit text in the prompt?

The prompt uses readline conventions, so shell users will feel at home.

Shortcut What it does
Ctrl+A / Ctrl+E Start or end of the current line
Ctrl+K Delete to end of line
Ctrl+U Delete from cursor to line start (repeat to clear across lines)
Ctrl+W Delete back to the previous whitespace
Ctrl+Y Paste the text you last deleted
Alt+Y after Ctrl+Y Cycle through earlier deleted text
Alt+B / Alt+F Move back or forward one word
Alt+D Delete to end of word
Ctrl+_ or Ctrl+Shift+- Undo the last input edit

Word shortcuts treat punctuation such as _, . and / as separators, so Alt+B steps through src/utils/foo.ts one segment at a time. Ctrl+W ignores punctuation and deletes back to the last space, so one press removes the whole path. On macOS, Option+Delete deletes just the previous word; on Windows, use Ctrl+Backspace. These word-editing keys cannot be remapped in the keybindings file.

How do you enter multiline prompts?

Enter sends. To add a line break instead:

Method Keys Where it works
Quick escape \ then Enter All terminals
Control sequence Ctrl+J All terminals, no setup
Shift+Enter Shift+Enter Native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, Windows Terminal
Option key Option+Enter macOS, after enabling Option as Meta
Paste Paste directly Code blocks and logs

In VS Code, Cursor, Alacritty before 0.16 and Zed, run /terminal-setup once to install a Shift+Enter binding. Inside tmux, Shift+Enter also needs the tmux settings described in our Claude Code terminal setup guide.

What do the prefix keys do?

A few characters change what the prompt does when you type them.

Key Effect
/ at start Open the command and skill menu
! at start Shell mode: run a command directly and add its output to the session
@ File path autocomplete
? on empty input Toggle the shortcut help panel

Shell mode is handy for ! git status or ! npm test. Claude sees the output and responds to it, so you can ask about failures without a second prompt. For the full command list, see our slash commands guide.

Which shortcuts work in the transcript viewer and fullscreen?

Ctrl+O opens the transcript viewer. Inside it:

Key What it does
q, Ctrl+C, Esc Exit the transcript view
Ctrl+E Toggle show all content (classic renderer only)
? Shortcut help panel (fullscreen rendering)
{ / } Jump to the previous or next prompt (fullscreen rendering)
[ Write the conversation to native scrollback for Cmd+F or tmux search (fullscreen rendering)
v Open the conversation in $VISUAL or $EDITOR (fullscreen rendering)

In fullscreen rendering, the conversation scrolls inside the app: PgUp and PgDn move half a screen, Ctrl+Home jumps to the start, and Ctrl+End jumps to the latest message and turns auto-follow back on.

How does vim mode work?

Turn on vim-style editing with /config then Editor mode, or set "editorMode": "vim" in ~/.claude/settings.json. It supports a solid subset of vim: hjkl, w/e/b, 0/$/^, gg/G, f/t motions, d/c/y with text objects like iw and i", visual mode with v and V, u to undo and . to repeat. Block-wise visual mode with Ctrl+V is not supported.

Unlike real vim, Enter still submits in INSERT mode. Use o, O or Ctrl+J for a new line. To map a two-key sequence such as jj to Escape, use the vimInsertModeRemaps setting in your user settings:

{
  "editorMode": "vim",
  "vimInsertModeRemaps": { "jj": "<Esc>" }
}

How do you make Option shortcuts work on macOS?

Most macOS terminals do not send Option as a modifier by default, so Alt+B, Alt+F, Option+P and Option+Enter do nothing until you change one setting. The terminal configuration docs give the setting for each terminal:

  • Apple Terminal: Settings, Profiles, Keyboard, check "Use Option as Meta Key". Running /terminal-setup does this for you.
  • iTerm2: Settings, Profiles, Keys, General, set Left and Right Option key to "Esc+".
  • VS Code: add "terminal.integrated.macOptionIsMeta": true to your settings.
  • Ghostty, Kitty and others: look for an Option-as-Alt or Option-as-Meta setting in the config file.

How do you customize Claude Code keybindings?

Run /keybindings to create or open ~/.claude/keybindings.json. The file holds a bindings array. Each block names a context and maps keystrokes to actions, or to null to unbind a default. Changes are picked up without restarting.

{
  "$schema": "https://www.schemastore.org/claude-code-keybindings.json",
  "bindings": [
    {
      "context": "Chat",
      "bindings": {
        "ctrl+e": "chat:externalEditor",
        "meta+g": "command:compact",
        "ctrl+s": null
      }
    }
  ]
}

Useful facts from the keybindings reference:

  • Contexts include Global, Chat, Autocomplete, Confirmation, Transcript, HistorySearch, Select and more.
  • Actions use a namespace:action format, such as chat:submit, chat:newline, app:toggleTranscript or history:search. command:<name> runs a slash command.
  • Swap Enter and Shift+Enter by mapping chat:newline and chat:submit.
  • Chords are space-separated, like ctrl+k ctrl+s, with 3 seconds between keystrokes.
  • Modifiers: meta, alt and option all mean Option on macOS and Alt elsewhere. cmd only works in terminals that report the Super key, so prefer ctrl or meta.
  • Reserved keys that cannot be rebound: Ctrl+C, Ctrl+D, Ctrl+M, Ctrl+[, Ctrl+I and Ctrl+H.
  • Conflicts: Ctrl+B clashes with the tmux prefix, Ctrl+A with GNU screen, and Ctrl+Z is the Unix suspend signal.

Claude Code validates the file and logs problems such as typos in modifiers or action names. Start it with --debug to see the warnings.

Keep your shortcuts and prompts close

Shortcuts save seconds; good prompts save whole sessions. Kipt keeps the prompts you reuse as Markdown in a private GitHub repo you own, with Cmd+K search to pull one up while Claude Code runs in the next window.

Questions

How do I see all keyboard shortcuts in Claude Code?

Type ? on an empty prompt to toggle the shortcut help panel. In fullscreen rendering, press ? inside the transcript viewer to see the shortcuts available there. The full list lives on the interactive mode page of the official docs.

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

Press Ctrl+J, or type a backslash and then press Enter. Both work in every terminal with no setup. Shift+Enter works natively in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal and Windows Terminal, and /terminal-setup adds it in VS Code, Cursor, Alacritty before 0.16 and Zed.

Why don't Option key shortcuts work in Claude Code on Mac?

Most macOS terminals do not send Option as a modifier by default. Turn on Use Option as Meta Key in Apple Terminal, set the Option keys to Esc+ in iTerm2, or add terminal.integrated.macOptionIsMeta to VS Code settings. Option+T works without this change.

How do I change keyboard shortcuts in Claude Code?

Run /keybindings to create or open ~/.claude/keybindings.json. Each block names a context, such as Chat, and maps keys to actions like chat:submit, or to null to unbind a default. Changes apply without restarting.

What does Shift+Tab do in Claude Code?

Shift+Tab cycles permission modes: Manual (called default in settings), acceptEdits, plan, and, when available, bypassPermissions and auto. From auto, the first press switches to Manual. On Windows without VT input mode the same action uses Alt+M.

More in Claude Code

All guides

Keep your prompts and skills in one place, in your own GitHub. Install every skill with one command.

Get started

Kipt is an independent product, not affiliated with or endorsed by Anthropic, OpenAI, Cursor or GitHub. Claude, ChatGPT, Codex, Cursor and GitHub are trademarks of their owners.