Tmux prefix key keystrokes leak into opencode TUI after mouse selection #8743

Open
opened 2026-02-16 18:10:43 -05:00 by yindo · 1 comment
Owner

Originally created by @robinr2 on GitHub (Feb 6, 2026).

Originally assigned to: @kommander on GitHub.

Environment:

  • Terminal: Kitty
  • Multiplexer: tmux
  • OS: Linux (Ubuntu 24.04)

Steps to reproduce:

  1. Run opencode in tmux + Kitty
  2. Copy text with mouse (highlight text in opencode)
  3. Press tmux prefix + number (e.g., Ctrl+Space + 2) to switch windows
  4. Expected: Window switches to window 2
  5. Actual: "2" appears in opencode's prompt input instead
    Frequency: ~50% of the time

Additional info:

  • Same tmux+Kitty setup works fine with other apps (vim, shell)
  • Issue only occurs in opencode's TUI
  • Tried setting escape-time 0 in tmux - didn't fix it

https://github.com/user-attachments/assets/bffc4959-8fa4-43bd-9af6-75084c7df8a5

  • Related to issue #7926 (mouse capture in TUI)
Originally created by @robinr2 on GitHub (Feb 6, 2026). Originally assigned to: @kommander on GitHub. Environment: - Terminal: Kitty - Multiplexer: tmux - OS: Linux (Ubuntu 24.04) Steps to reproduce: 1. Run opencode in tmux + Kitty 2. Copy text with mouse (highlight text in opencode) 3. Press tmux prefix + number (e.g., Ctrl+Space + 2) to switch windows 4. Expected: Window switches to window 2 5. Actual: "2" appears in opencode's prompt input instead Frequency: ~50% of the time Additional info: - Same tmux+Kitty setup works fine with other apps (vim, shell) - Issue only occurs in opencode's TUI - Tried setting escape-time 0 in tmux - didn't fix it https://github.com/user-attachments/assets/bffc4959-8fa4-43bd-9af6-75084c7df8a5 - Related to issue #7926 (mouse capture in TUI)
yindo added the opentui label 2026-02-16 18:10:43 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 6, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7926: Add option to disable mouse capture in TUI for better terminal multiplexer compatibility
  • #6824: Add a settings to disable mouse
  • #8614: Mouse input mixed with command input when moving mouse during interaction
  • #12434: Mouse/scroll events misbehave after exiting opencode

These issues are all related to mouse capture behavior in terminal multiplexers (tmux, Zellij) and the TUI interfering with normal terminal operations. The root cause appears to be the same: mouse capture not properly handling terminal multiplexer workflows.

Feel free to ignore if this specific case is different from the above issues.

@github-actions[bot] commented on GitHub (Feb 6, 2026): This issue might be a duplicate of existing issues. Please check: - #7926: Add option to disable mouse capture in TUI for better terminal multiplexer compatibility - #6824: Add a settings to disable mouse - #8614: Mouse input mixed with command input when moving mouse during interaction - #12434: Mouse/scroll events misbehave after exiting opencode These issues are all related to mouse capture behavior in terminal multiplexers (tmux, Zellij) and the TUI interfering with normal terminal operations. The root cause appears to be the same: mouse capture not properly handling terminal multiplexer workflows. Feel free to ignore if this specific case is different from the above issues.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8743