Skip to content

tmux extended-keys: Shift+Enter for Claude Code multi-line prompts - #11

Merged
oz6un merged 1 commit into
mainfrom
feat/tmux-extended-keys
Jul 14, 2026
Merged

tmux extended-keys: Shift+Enter for Claude Code multi-line prompts#11
oz6un merged 1 commit into
mainfrom
feat/tmux-extended-keys

Conversation

@oz6un

@oz6un oz6un commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Why

Claude Code's /terminal-setup (which wires up Shift+Enter for multi-line prompts) refuses to run inside tmux. But that command isn't the actual fix — the real requirement is that tmux forward modified keys to the app running inside it. Without that, Shift+Enter never reaches Claude Code and it submits instead of inserting a newline.

What

Two lines in files/tmux.conf:

set -s extended-keys on
set -as terminal-features "xterm*:extkeys"

With these, tmux forwards Shift+Enter (and other modified keys) to Claude Code, which auto-detects it — no manual keybinding needed. allow-passthrough on was already present. Terminal support required: Ghostty sends these natively; mobile (Termius) doesn't reliably send Shift+modifier, so phones keep using the universal \ + Return (or Ctrl+J).

Verified

Config loads clean on the box (tmux 3.4, source-file no errors); extended-keys on and extkeys confirmed applied via tmux show; allow-passthrough and the touch-control toolbar both intact; no personal residue; make check green. The end behavior (pressing Shift+Enter in Claude Code) requires a supporting terminal + keypress, so it's verified at the tmux-settings level and confirmed on-device from Ghostty.

🤖 Generated with Claude Code

Claude Code's /terminal-setup refuses to run inside tmux, but that command
isn't the fix — the requirement is tmux forwarding modified keys to the app.
extended-keys on + terminal-features extkeys make tmux forward Shift+Enter to
Claude Code, which auto-detects it (no manual keybinding). Terminal must send
it (Ghostty does); mobile keeps the universal \ + Return fallback.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@oz6un
oz6un merged commit cae990c into main Jul 14, 2026
1 check passed
@oz6un
oz6un deleted the feat/tmux-extended-keys branch July 14, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant