tmux extended-keys: Shift+Enter for Claude Code multi-line prompts - #11
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:With these, tmux forwards Shift+Enter (and other modified keys) to Claude Code, which auto-detects it — no manual keybinding needed.
allow-passthrough onwas 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-fileno errors);extended-keys onandextkeysconfirmed applied viatmux show;allow-passthroughand the touch-control toolbar both intact; no personal residue;make checkgreen. 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