Skip to content

[FEATURE]: add a settings to disable mouse #6824

Closed

Description

@blackheaven

Feature hasn't been suggested before.

  • 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.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 4, 2026
  2. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 4, 2026
  3. github-actions commented on Jan 4, 2026

    @github-actions
    Contributor

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

    Feel free to ignore if none of these address your specific case.

  4. jdanbrown commented on Feb 12, 2026

    @jdanbrown
    Contributor

    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:

    1. I can't double-click to select words
    2. I can't triple-click to select lines
    3. When I single-click and drag, the selection goes away when I release the click (instead of staying selected)
    4. When I single-click and drag, copy happens automatically when I release the click (instead of requiring cmd+c)
    5. 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.

  5. gardner commented on Feb 14, 2026

    @gardner

    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.

  6. blackheaven commented on Feb 15, 2026

    @blackheaven
    ContributorAuthor

    I have started this #13748 (to be tested)

  7. adrianlzt commented on Mar 27, 2026

    @adrianlzt

    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.

  8. Amarjit commented on Apr 2, 2026

    @Amarjit

    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:

    • Enable/disable text selection via mouse drag
    • Enable/disable auto-copy on selection release
    • Enable/disable mouse-based option selection
    • Keyboard-only mode (completely disable mouse interaction)
    • Someone mentioned triple clicking for copying lines

    This would allow users to tailor behavior to their workflow and avoid unintended input issues.

  9. bogorad commented on Apr 5, 2026

    @bogorad

    Yep, it clashes with my setup too:

    Wezterm + EternalTerminal + tmux + opencode. I disabled the mouse in tmux, but opencode's mouse handling gets in the way of Wez's.

  10. blackheaven commented on Apr 5, 2026

    @blackheaven
    ContributorAuthor

    BTW #13748 is working

  11. bogorad commented on Apr 6, 2026

    @bogorad

    Thanks Aiden!!! @rekram1-node

  12. added a commit that references this issue on Apr 6, 2026
  13. jorpnes commented on Nov 13, 2026

    @jorpnes

    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


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussionopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions