Skip to content

fix: tmux-256color default-terminal for extended keys (Pi Shift+Enter) - #28

Merged
thecodeassassin merged 1 commit into
mainfrom
fix/tmux-default-terminal-256color
Jun 22, 2026
Merged

fix: tmux-256color default-terminal for extended keys (Pi Shift+Enter)#28
thecodeassassin merged 1 commit into
mainfrom
fix/tmux-default-terminal-256color

Conversation

@thecodeassassin

Copy link
Copy Markdown
Contributor

Pi's modified keys (Shift+Enter, Ctrl+J) do nothing inside ExitBox's tmux, even with extended-keys on + extended-keys-format csi-u + terminal-features *:extkeys (all already on main). They DO work with --no-tmux, but tmux is required for ExitBox's status bar / workspace switcher / session resume.

Cause

The generated tmux config set default-terminal "xterm-256color". The xterm-256color terminfo does not declare the extended-key capabilities tmux relies on to expose modified keys to inner programs; tmux-256color (the value the tmux project recommends) does. With xterm-256color, Pi's Kitty/extended-keys negotiation through tmux doesn't yield modified keys.

Fix

Set default-terminal "tmux-256color" (terminfo ships in Alpine's ncurses-terminfo-base, already in the base image), with a safe infocmp fallback to xterm-256color if the entry is ever missing.

Tests

New test_write_tmux_conf_default_terminal: stubs infocmp to assert tmux-256color is chosen when available and xterm-256color when not. Entrypoint suite: 108 pass, 2 pre-existing failures (codex session-storage env leakage, unrelated).

Note: entrypoint ships in the base image — needs an image rebuild to take effect.

@thecodeassassin
thecodeassassin merged commit 215c3e4 into main Jun 22, 2026
7 checks passed
@thecodeassassin
thecodeassassin deleted the fix/tmux-default-terminal-256color branch June 22, 2026 23:29
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