Solo Stack Kits Directory
Claude Code workflows & skills for solo consultants and freelancers

← Blog · 2026-11-08

Claude Code Shift+Enter Not Working? 12 Fixes for New Lines, Option Keys and Notifications

10-second fix: press Ctrl+J, or type \ and then press Enter. Both insert a new line without sending, in every terminal, with no setup. If you want Shift+Enter specifically, find your terminal in the table below: in VS Code, Cursor, Zed and older Alacritty you run /terminal-setup once; in gnome-terminal and JetBrains IDEs Shift+Enter isn't available at all; inside tmux you need the four lines in fix 4.

Claude Code works in any terminal without configuration, but your terminal decides which key signals actually reach it. Plain Enter always submits. Whether Shift+Enter arrives as something different from Enter depends on the terminal emulator:

Terminal Shift+Enter for a new line
Ghostty, Kitty, iTerm2, WezTerm, Warp, Apple Terminal, Windows Terminal Works without setup
Other terminals with the kitty keyboard protocol, such as foot and Alacritty 0.16+ Works without setup on Claude Code v2.1.269 or later
VS Code, Cursor, Devin Desktop, Alacritty before 0.16, Zed Run /terminal-setup once
gnome-terminal, JetBrains IDEs such as PyCharm and Android Studio Not available: use Ctrl+J or \ then Enter

Shift+Enter submits instead of adding a new line: 6 fixes

  1. Use a key that works everywhere. Ctrl+J and \ + Enter insert a line break in every terminal. On macOS, Option+Enter also works once Option is set up as Meta (fix 7). Pasting multi-line text keeps its line breaks too, so for a long prompt you can write it in an editor and paste it in. These are the only options in gnome-terminal and JetBrains IDE terminals, where Shift+Enter can't be told apart from Enter.
  2. Your terminal needs /terminal-setup. In the VS Code, Cursor and Devin Desktop integrated terminals, Alacritty before 0.16 and Zed, run /terminal-setup once inside Claude Code. It writes a Shift+Enter keybinding into that terminal's configuration file, and on the first run prints a confirmation such as Installed VSCode terminal Shift+Enter key binding. If it prints ... key binding already configured, it found an existing binding and changed nothing. In VS Code, Cursor and Devin Desktop it also sets terminal.integrated.gpuAcceleration to "off" (to stop garbled text) and adjusts terminal.integrated.mouseWheelScrollSensitivity; set GPU acceleration back to "auto" and reload the window if you want to undo that.
  3. You ran /terminal-setup inside tmux or screen. It has to write to the host terminal's configuration, so run it directly in the outer terminal, not in a tmux or screen pane.
  4. You're inside tmux. By default tmux can't tell Shift+Enter from Enter, so it submits even when your outer terminal supports it. Add these lines to ~/.tmux.conf, then run tmux source-file ~/.tmux.conf to apply them to the running server:
set -g allow-passthrough on
set -g focus-events on
set -s extended-keys on
set -as terminal-features 'xterm*:extkeys'

The two extended-keys lines are what make Shift+Enter work; allow-passthrough is for notifications (fix 10). If you also hit Ctrl+B in Claude Code, remember it's tmux's prefix key, so press it twice.

  1. Zed's keymap couldn't be updated. In Zed, /terminal-setup merges the binding into your keymap.json and first backs it up to a copy such as keymap.json.1a2b3c4d.bak in the same folder. If Claude Code can't read, parse or back up the keymap, or can't verify the merged result, it leaves the file unchanged and prints the keybinding block for you to add by hand. Paste that block into keymap.json yourself.
  2. You want different keys. To use another key for a new line, or to swap the behavior so Enter adds a line and Shift+Enter sends, map the chat:newline and chat:submit actions in the Chat context of ~/.claude/keybindings.json (run /keybindings to create or open it). For example "shift+enter": "chat:newline" and "enter": "chat:submit" inside {"bindings": [{"context": "Chat", "bindings": {...}}]}. A remap can't make a terminal send a key it doesn't send, so this doesn't help in gnome-terminal or JetBrains. If a binding never fires, start claude --debug: Claude Code writes a warning to the debug log for invalid JSON, misspelled modifiers such as ctl+k, a space next to + (which turns the key into a chord that never matches), unknown actions and reserved shortcuts. Ctrl+C, Ctrl+D and Ctrl+M (always Enter) can't be rebound.

Option shortcuts do nothing on a Mac: 1 fix

  1. Turn on Option as Meta. Shortcuts such as Option+Enter (new line) and Option+P (switch model) need the terminal to send Option as a modifier, which most macOS terminals don't by default:
    • Apple Terminal: Settings → Profiles → Keyboard → tick "Use Option as Meta Key". If you accepted Claude Code's first-run terminal setup prompt, this is already done.
    • iTerm2: Settings → Profiles → Keys → General → set Left and Right Option key to "Esc+".
    • VS Code terminal: add "terminal.integrated.macOptionIsMeta": true to your VS Code settings.
    • Ghostty, Kitty and others: look for an Option-as-Alt or Option-as-Meta setting in the terminal's config file.

No sound or alert when Claude finishes: 3 fixes

  1. Your terminal gets no notification by default. Claude Code sends a desktop notification on its own only in Ghostty, Kitty and iTerm2 (iTerm2 also needs its alert settings on: Settings → Profiles → Terminal → "Notification Center Alerts", then Filter Alerts → "Send escape sequence-generated alerts"). Apple Terminal gets at most a silent bell character, and other terminals, including Warp and the VS Code integrated terminal, get nothing. To ring the bell everywhere, add "preferredNotifChannel": "terminal_bell" to ~/.claude/settings.json; in Apple Terminal also turn on Audible bell under Settings → Profiles → Advanced to hear it. If the key seems ignored, our settings not applying guide shows which settings file wins.
  2. You want a real sound or desktop pop-up in any terminal. Add a Notification hook. It runs alongside the built-in notification, so it works in terminals that get nothing. On macOS this plays a sound:
{
  "hooks": {
    "Notification": [
      { "hooks": [{ "type": "command", "command": "afplay /System/Library/Sounds/Glass.aiff" }] }
    ]
  }
}

Our free hooks settings generator builds the JSON for you, and Claude Code hooks not working covers a hook that never fires. If the alert still doesn't appear, check that your terminal app has notification permission in your OS settings.

  1. Notifications don't get out of tmux or SSH. Inside tmux, keep set -g allow-passthrough on from fix 4 and set preferredNotifChannel to "iterm2", "kitty" or "ghostty" to match your outer terminal; a pane in a tmux window you aren't viewing still sends nothing. Over SSH (outside tmux), set preferredNotifChannel to your local terminal's value on the machine running Claude Code, and the notification reaches your local machine. A missed alert is a common reason a session looks stuck or not responding when it's really waiting on a permission prompt.

Other keyboard and display problems: 2 fixes

  1. Backspace deletes a whole word on Windows. On Windows, Claude Code reads a Backspace that arrives as ^H as Ctrl+Backspace, which deletes the previous word (except when TERM_PROGRAM is mintty or TERM is cygwin). If every Backspace eats a word, set CLAUDE_CODE_BS_AS_CTRL_BACKSPACE=0. If Ctrl+Backspace erases only one character on macOS or Linux, set it to 1 instead. More Windows issues are in Claude Code not working on Windows.
  2. The display flickers, scrollback jumps or text is garbled. Run /tui fullscreen to switch to fullscreen rendering (you then scroll inside Claude Code with the mouse or PageUp); your conversation relaunches intact and the choice is saved. Or start with CLAUDE_CODE_NO_FLICKER=1 claude. If flicker is the only problem and your terminal supports synchronized output but isn't detected, such as Emacs eat, set CLAUDE_CODE_FORCE_SYNC_OUTPUT=1 instead. Boxes or smeared characters in the VS Code, Cursor or Devin Desktop terminal usually mean the GPU renderer: /terminal-setup turns it off. Editor-side connection problems are in Claude Code IDE not connecting.

Two habits that help


Facts on this page come from Anthropic's Claude Code docs on terminal configuration, interactive mode, keybindings, hooks and the settings reference. This guide isn't affiliated with Anthropic.

Made by Solo Stack Kits. Now that your keys work, keep Claude Code on a short leash. Start with our free Claude Code safety hooks, or get the Claude Code Power Config Pack with a tested needs-input notification hook, permission presets and 8 safety hooks, $6 with the launch code while it lasts.

Want it set up already? Claude Code Power Config Pack

Fixed it? Skip the next one with a tested Claude Code setup you can drop into any repo.

One install command that backs up your settings first. Checked against the official Claude Code docs. MIT licensed.

Launch price: $6 instead of $12 (code LAUNCH50, first 25 buyers, until Nov 10, 2026).

Get the Config Pack: $6 launch priceOr try 2 of the hooks free

Free on Gumroad: block-dangerous-bash and protect-secrets with a settings snippet. Enter $0; Gumroad asks for an email to deliver the zip.

Prefer to build it yourself? Use the free Claude Code tools, no sign-up.