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
Right-click paste doesn't work in TUI when mouse capture is enabled #36456
When mouse: true (default) in tui.json, the TUI captures all mouse events, which suppresses the terminal native right-click context menu. The right-click handler returns early when OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT is not set, so no paste action occurs.
The paste infrastructure already exists — bracketed paste (onPaste handler) and prompt.paste command both work. The fix would be to have the right-click handler call prompt.paste (or trigger bracketed paste) instead of returning early when copy-on-select is enabled.
Expected behavior: Right-click pastes clipboard content into the prompt input.
Actual behavior: Right-click does nothing (mouse captured, no paste action).
Workarounds:
Ctrl+Shift+V works
Setting "mouse": false in tui.json restores native terminal menu (but loses select-to-copy / seamless copy behavior)
Same issue on WezTerm + WSL2 (Ubuntu). WezTerm is configured with right-click mapped to paste from clipboard, and opencode needs "mouse": true in tui.json for click-to-expand on truncated output — with mouse capture on, right-click is swallowed and silently does nothing. Current workarounds are Shift+right-click (terminal-side bypass) and keyboard paste (Ctrl+Shift+V). A right-click-to-paste binding or option in tui.json would fix this properly. opencode 1.18.30.
Activity
github-actions commentedon Jul 11, 2026
This issue might be a duplicate of or related to existing issues. Please check:
OPENCODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT/ mouse capture interaction described heresimonklee commentedon Jul 12, 2026
I've been meaning to get much closer to native copy-paste feeling. Let me have a look at the pr
yylzl commentedon Sep 9, 2026
Same issue on WezTerm + WSL2 (Ubuntu). WezTerm is configured with right-click mapped to paste from clipboard, and opencode needs
"mouse": trueintui.jsonfor click-to-expand on truncated output — with mouse capture on, right-click is swallowed and silently does nothing. Current workarounds are Shift+right-click (terminal-side bypass) and keyboard paste (Ctrl+Shift+V). A right-click-to-paste binding or option intui.jsonwould fix this properly. opencode 1.18.30.thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊