GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [FEATURE]: More control over mouse capture in TUI · Issue #43676 · anomalyco/opencode

[FEATURE]: More control over mouse capture in TUI #43676

New issue
Copy link
New issue
Copy link
Open
Open
[FEATURE]: More control over mouse capture in TUI#43676
Copy link
Assignees
simonklee

Description

@fmichaut-diff
fmichaut-diff
opened on Aug 20, 2026
Issue body actions

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

The current setting for mouse capture in TUI is to either have it enabled, or fully disable it.

I would like a more granular control over which features of the mouse capture I want to use.

For instance, instead of :

{
    ...
    "mouse": true, // or "mouse": false
}

I would like to be able to write :

{
    ...
    "mouse": {
        "scroll": true, // I want to use the mouse scrolling normally
        "select": false, // I DONT want opencode to override my terminal's select behavior, I have it customized how I like it (lots of users seem to complain of related selection issues)
        "click": true, // I want to use the click features to toggle subagents / thinking blocks / tool blocks
        "move_cursor_on_click": false // I DONT want opencode to move the cursor when I click around my text prompt
    }

Theses are the options I would personally need (and I'm sure a lot of people would like similar options) but I would not be opposed to have access to even more control if it makes sense.

Mouse capture is a pretty useful but invasive feature, which means that its difficult to live without it but it has a lot of drawbacks. In order to properly balance theses 2 aspects of it, users need as much control as possible over it.

For backward compatibility, "mouse": true or "mouse": false would just enable or disable every mouse feature as it currently does.

Reacted by Niels Bach-Sørensen, Matthias, Barry Moore II and avandermeer

Activity

  1. github-actions
    assigned
    simonklee
    on Aug 20, 2026
  2. github-actions commented on Aug 20, 2026

    @github-actions
    github-actionsBot
    on Aug 20, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • [FEATURE]: Toggle to disable mouse tracking in the TUI #36266: [FEATURE]: Toggle to disable mouse tracking in the TUI (open, related — requests similar mouse control granularity)
    • [FEATURE]: separate 'copy on select' from 'mouse' setting #34063: [FEATURE]: separate 'copy on select' from 'mouse' setting (closed, partially overlapping — granular mouse sub-feature control)
  3. fmichaut-diff commented on Aug 20, 2026

    @fmichaut-diff
    fmichaut-diff
    on Aug 20, 2026
    Author
    More actions

    Not a duplicate. There is overlap, but this feature request is to address even more usecases than the very specific ones linked above

  4. gh-nbs commented on Sep 2, 2026

    @gh-nbs
    gh-nbs
    on Sep 2, 2026
    More actions

    Supporting this. Claude Code already solves exactly this: CLAUDE_CODE_DISABLE_MOUSE_CLICKS=1 (v2.1.195+) disables click/drag/hover while keeping wheel scrolling. A similar granular split here (e.g. mouse.click: false while mouse: true keeps wheel scroll) would cover this use case.

  5. opencodejr commented on Oct 28, 2026

    @opencodejr
    opencodejrBot
    on Oct 28, 2026
    Contributor
    More actions

    Thanks for the detailed request! You're asking to replace the on/off mouse setting in the TUI with separate options for scrolling, text selection, clicking blocks (subagents, thinking, tools) and moving the prompt cursor on click. true and false would still turn everything on or off, as they do now.

    Maintainers will consider it. One note: terminals capture the mouse all-or-nothing, so while capture is on, drag-selection always goes to the app. In most terminals, holding Shift (or Option on macOS) while dragging still gives you the terminal's own selection, which may help in the meantime.

    Related issues:

    • Mouse capture blocks right-click paste in Windows Terminal #48004: mouse capture blocks right-click paste in Windows Terminal
    • tui: drag-selection freezes the interface when mouse capture is enabled #51056: drag-selection freezes the TUI when mouse capture is enabled
    • TUI copy should preserve logical text instead of rendered layout #47165: TUI copy should preserve logical text
    • [FEATURE]: add a settings to disable mouse #6824 / feat: Add option to disable mouse capture in TUI for better terminal multiplexer compatibility #7926: earlier requests that led to the current on/off mouse option
  6. axeluhl commented on Oct 30, 2026

    @axeluhl
    axeluhl
    on Oct 30, 2026
    More actions

    On move_cursor_on_click: I've built this for the prompt and use it daily: axeluhl@e0f97ff

    • Selecting with the mouse (drag, double or triple click) leaves the cursor where it is.
    • Typing or pasting afterwards acts at the cursor and drops the selection instead of replacing it.
    • A single click still places the cursor, after the double-click interval, so a double click never moves it first. A key press ends the wait early.

    Right now it's on when terminal.copy is primary or both (from #32370), where a selection is mostly meant for middle-click paste. It could just as well be a mouse sub-setting as proposed here. Happy to turn it into a PR once there's a direction.

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

Metadata

Metadata

Assignees

  • @simonklee
    simonklee

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.