Skip to content

extended-keys breaks Shift+key in terminals without CSI u support (cmux, others) #417

@afterthought

Description

@afterthought

Bug

agent-deck unconditionally enables tmux extended-keys on and appends extkeys to terminal-features on every session create/restart. This breaks Shift+R, Shift+D, and other modified key combos in terminal emulators that don't support the CSI u / kitty keyboard protocol.

Impact

With extended-keys on, tmux encodes Shift+R as \e[82;2u (CSI u sequence) instead of ASCII R. Terminals that don't understand this encoding silently drop the keypress, making TUI keybindings like Restart (R), Delete (D), Close (D) completely non-functional.

Affected Terminals

  • cmux — sets TERM=xterm-ghostty but does not support CSI u
  • Alacritty — no CSI u support
  • Terminal.app — no CSI u support
  • iTerm2 — partial support
  • Any terminal not implementing the kitty keyboard protocol

Working Terminals

  • Ghostty — full CSI u support
  • kitty — originates the protocol
  • WezTerm — full support
  • foot — full support

Additional Issue: terminal-features accumulation

ensureTerminalFeatures was appending *:hyperlinks:extkeys on every session start, leading to 70+ duplicate entries in terminal-features. This was addressed by #366 with a dedup check, but users who ran earlier versions still have the accumulated entries in their running tmux server.

Suggested Fix

Check whether the outer terminal supports CSI u before enabling extended-keys and extkeys. A TERM + TERM_PROGRAM check can reliably distinguish supported terminals. Default to off — breaking Shift+key input is worse than missing extended key reports.

Workaround

tmux set-option -g extended-keys off

Must be re-run after every tmux restart or session creation.

Version

v0.26.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions