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
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
I'd like to add a settings option to totally disable the mouse in the TUI.
Reacted by Akshay, Andrew Dirksen, Dan Brown, Gardner Bickford, Alexander Félix, Jeril Kuriakose, Peter Solodov, freewu, Mitchel Humpherys, mschedrin and 7 more
Reacted by Lam Nguyen, Bloom, Dan Brown, Gardner Bickford, Adrián López and Alex Budkar
Yes please! The mouse behaviors in opencode drive me nuts because they're so idiosyncratic (vs. macOS behaviors). The end result is my brain gets trained to just avoid the mouse as much as possible to avoid constantly being surprised. A few examples:
I can't double-click to select words
I can't triple-click to select lines
When I single-click and drag, the selection goes away when I release the click (instead of staying selected)
When I single-click and drag, copy happens automatically when I release the click (instead of requiring cmd+c)
Scrolling moves with different speed and momentum than my terminal
Ideally opencode/opentui could add support for all of these behaviors, and also implement them in a way that matches the behavior of the host platform. But that sounds like a pretty tall ask, so personally I'd rather just be able to disable mouse behaviors in opencode entirely to get all my standard platform/terminal behaviors back.
And OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT doesn't solve this because it only disables copying after selecting text — it doesn't change the selection behavior, the scrolling behavior, etc. What we're asking for here is disabling mouse handling entirely, so that all standard behaviors like those 1–5 examples work again.
This drives me nuts. I stopped using open code for a few months and waited for something to land that allows disabling this. OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT disables the copy but now I can't select any text. It just drags the cursor around. Please consider adding a switch to disable this.
Focus click selecting first option
When switching from another application back to OpenCode, clicking anywhere in the window immediately selects the first option.
This is quite disruptive — the first click should only restore focus, not trigger a selection.
Mouse mode persists after terminal crash
If the terminal crashes, mouse mode can remain active. Moving the mouse then prints raw escape codes to the screen - like a beautiful piece of 90's ASCII art.
(Workaround: running reset fixes it.)
Suggestion: More granular mouse configuration
Granular mouse control
It would be great to have fine-grained control over mouse behavior. Ideally, each interaction could be toggled via flags in the opencode config file:
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
github-actions commentedon Jan 4, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
jdanbrown commentedon Feb 12, 2026
Yes please! The mouse behaviors in opencode drive me nuts because they're so idiosyncratic (vs. macOS behaviors). The end result is my brain gets trained to just avoid the mouse as much as possible to avoid constantly being surprised. A few examples:
Ideally opencode/opentui could add support for all of these behaviors, and also implement them in a way that matches the behavior of the host platform. But that sounds like a pretty tall ask, so personally I'd rather just be able to disable mouse behaviors in opencode entirely to get all my standard platform/terminal behaviors back.
And
OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECTdoesn't solve this because it only disables copying after selecting text — it doesn't change the selection behavior, the scrolling behavior, etc. What we're asking for here is disabling mouse handling entirely, so that all standard behaviors like those 1–5 examples work again.jdanbrown commentedon Feb 12, 2026
More related:
gardner commentedon Feb 14, 2026
This drives me nuts. I stopped using open code for a few months and waited for something to land that allows disabling this.
OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECTdisables the copy but now I can't select any text. It just drags the cursor around. Please consider adding a switch to disable this.blackheaven commentedon Feb 15, 2026
I have started this #13748 (to be tested)
adrianlzt commentedon Mar 27, 2026
I would like to disable mouse clicks while options are being displayed. I keep accidentally clicking them when I’m just trying to focus on the term.
Amarjit commentedon Apr 2, 2026
Two biggest mouse-related issues I’ve run into:
Focus click selecting first option
When switching from another application back to OpenCode, clicking anywhere in the window immediately selects the first option.
This is quite disruptive — the first click should only restore focus, not trigger a selection.
Mouse mode persists after terminal crash
If the terminal crashes, mouse mode can remain active. Moving the mouse then prints raw escape codes to the screen - like a beautiful piece of 90's ASCII art.
(Workaround: running reset fixes it.)
Suggestion: More granular mouse configuration
Granular mouse control
It would be great to have fine-grained control over mouse behavior. Ideally, each interaction could be toggled via flags in the opencode config file:
This would allow users to tailor behavior to their workflow and avoid unintended input issues.
bogorad commentedon Apr 5, 2026
Yep, it clashes with my setup too:
Wezterm+EternalTerminal+tmux+opencode. I disabled the mouse intmux, but opencode's mouse handling gets in the way of Wez's.blackheaven commentedon Apr 5, 2026
BTW #13748 is working
feat(tui): make the mouse disablable (anomalyco#6824, anomalyco#7926)
feat(tui): make the mouse disablable (#6824, #7926) (#13748)
bogorad commentedon Apr 6, 2026
Thanks Aiden!!! @rekram1-node
Sync Opencode 1.3.17 (#40)
feat(tui): make the mouse disablable (anomalyco#6824, anomalyco#7926) (…
feat(tui): make the mouse disablable (#6824, #7926) (#13748)
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