You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: Add option to disable mouse capture in TUI for better terminal multiplexer compatibility #7926
When running OpenCode inside terminal multiplexers like Zellij or tmux, the TUI's mouse capture prevents normal copy operations:
Mouse selection - captured by TUI, can't use native terminal selection
Ctrl+C - exits OpenCode instead of copying selected text
While Shift+mouse works as a workaround in some terminals, this is not intuitive and doesn't work consistently across all setups.
Proposal
Add a configuration option to disable mouse capture entirely:
// opencode.json
{
"tui": {
"mouse": false
}
}
Or via environment variable:
OPENCODE_DISABLE_MOUSE=true opencode
Rationale
OpenCode TUI doesn't heavily rely on mouse interactions - the primary workflow is keyboard-driven. Users who prefer mouse-based text selection over TUI mouse features should have the option to disable capture.
Environment
Terminal: Zellij / tmux
OS: Linux
OpenCode version: latest
Reacted by Mark Ellis, Dan Brown, Airead, Gautier DI FOLCO, Iblea, Peter Solodov, Max, Victor Amaral Kzam, Petr Ruzicka, Robert S Lundgren and 13 more
When I'm switching between windows, I can accidentally click the wrong answer of the Question tool by clicking an area not meant to be clickable.
This config will help prevent "missclick".
Reacted by Victor Amaral Kzam, Robert S Lundgren, Floxinium and Kieron
+1 from me, the current behaviour is unusable on the macOS default terminal breaking copy-/paste which works perfectly with the two big competitors, both starting with C.
Disabling mouse capture has the same effect as shift drag copying. When doing multi-line copying, you will still get redundant trailing blank characters(if not characters from an other display element), which is still inconvenient. I suggest writing copied content to a file, often SSH users can open multiple sessions to access such file without leaving the TUI interface. And writing to a file is trivial to implement.
Comentario para los issues #6824 / #7926 (pedir opción de desactivar el mouse):
+1 — affected on Windows 11 (build 10.0.26300), opencode 2.3.0, VS Code integrated terminal.
While working normally, mouse-tracking data leaks into the TUI input as random text (bursts of digits and escape-like sequences, several times a day). Same family of reports as #8866 (;23M;26M;29M mouse reports typed into the input) and #8715.
A tui: { mouse: false } option (or OPENCODE_DISABLE_MOUSE=true) would be an immediate, clean workaround until mouse reports are parsed properly on Windows. I checked https://opencode.ai/config.json on 2026-11-13 and neither key exists in the schema yet.
Details and a full reproduction context in the new issue I opened: #63831
Activity
wwalker commentedon Jan 15, 2026
+1, this issue makes
opencodealmost completely unusable for me.Environment:
onyedikachi23 commentedon Feb 2, 2026
I need this, pls.
VRuzhentsov commentedon Feb 13, 2026
Additional somewhat related usecase:
When I'm switching between windows, I can accidentally click the wrong answer of the
Question toolby clicking an area not meant to be clickable.This config will help prevent "missclick".
max-foss commentedon Mar 4, 2026
+1 from me, the current behaviour is unusable on the macOS default terminal breaking copy-/paste which works perfectly with the two big competitors, both starting with C.
victorkzam commentedon Mar 11, 2026
+1 also the virtual scrolling makes the experience much worse to use in smaller screens
rsl-pseudocode commentedon Mar 13, 2026
Why is mouse even the default. I just want to turn it off, really frustrating
Ero98 commentedon Mar 28, 2026
Disabling mouse capture has the same effect as shift drag copying. When doing multi-line copying, you will still get redundant trailing blank characters(if not characters from an other display element), which is still inconvenient. I suggest writing copied content to a file, often SSH users can open multiple sessions to access such file without leaving the TUI interface. And writing to a file is trivial to implement.
feat(tui): make the mouse disablable (#6824, #7926) (#13748)
Sync Opencode 1.3.17 (#40)
bogorad commentedon Apr 7, 2026
fyi:
4712c18
feat(tui): make the mouse disablable (anomalyco#6824, anomalyco#7926) (…
lee-b commentedon Jun 4, 2026
Yes, we need the equivalent of vim's
set mouse=, and tmux's: set -g mouse off.feat(tui): make the mouse disablable (#6824, #7926) (#13748)
github-actions commentedon Aug 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
lee-b commentedon Aug 4, 2026
:/
jorpnes commentedon Nov 13, 2026
Comentario para los issues #6824 / #7926 (pedir opción de desactivar el mouse):
+1 — affected on Windows 11 (build 10.0.26300), opencode 2.3.0, VS Code integrated terminal.
While working normally, mouse-tracking data leaks into the TUI input as random text (bursts of digits and escape-like sequences, several times a day). Same family of reports as #8866 (
;23M;26M;29Mmouse reports typed into the input) and #8715.A
tui: { mouse: false }option (orOPENCODE_DISABLE_MOUSE=true) would be an immediate, clean workaround until mouse reports are parsed properly on Windows. I checkedhttps://opencode.ai/config.jsonon 2026-11-13 and neither key exists in the schema yet.Details and a full reproduction context in the new issue I opened: #63831