Skip to content

feat(tui): add disable_mouse option for Linux right-click paste support#6329

Closed
aarongrtech wants to merge 1 commit intoanomalyco:devfrom
aarongrtech:fix/linux-right-click-paste
Closed

feat(tui): add disable_mouse option for Linux right-click paste support#6329
aarongrtech wants to merge 1 commit intoanomalyco:devfrom
aarongrtech:fix/linux-right-click-paste

Conversation

@aarongrtech
Copy link
Copy Markdown

Summary

Adds a --disable-mouse CLI flag and tui.disable_mouse config option to allow users to disable mouse tracking, enabling native terminal right-click paste functionality on Linux terminals that use PuTTY-style paste (e.g., Terminator).

Fixes #4754

Changes

  • Added disable_mouse: boolean to TUI config schema (config.ts)
  • Added --disable-mouse CLI flag to both thread.ts and attach.ts commands
  • Implemented mouse tracking disable logic in app.tsx using ANSI escape sequences

Usage

CLI flag:

opencode --disable-mouse

Config file (opencode.json):

{
  "tui": {
    "disable_mouse": true
  }
}

Technical Details

When enabled, sends ANSI escape sequences to disable all mouse tracking modes:

  • \x1b[?1000l - Disable button press/release tracking
  • \x1b[?1002l - Disable button motion tracking
  • \x1b[?1003l - Disable all motion tracking
  • \x1b[?1006l - Disable SGR extended mouse mode

This allows the terminal's native right-click paste behavior to work instead of being intercepted by opentui.

Add --disable-mouse CLI flag and tui.disable_mouse config option to allow
users to disable mouse tracking, enabling native terminal right-click paste
functionality on Linux terminals like Terminator that use PuTTY-style paste.

When enabled, sends ANSI escape sequences to disable all mouse tracking modes:
- Button press/release tracking (1000)
- Button motion tracking (1002)
- All motion tracking (1003)
- SGR extended mouse mode (1006)

Fixes anomalyco#4754
@github-actions
Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions bot closed this Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy and Paste behaviour under Linux

1 participant