anomalyco / anomalyco/opencode
[Feature Request] Add config option to disable copy-on-select behavior
@rekram1-node is already working on this.
Since Jan 25, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
OC implements "XTerm / GPM"-style copy-on-select
Selecting text with the mouse automatically copies it to the clipboard when the mouse button is released. As far as I can find, there is no way to disable this behavior.
I'd like to be able to turn off copy-on-select via opencode.json config because frankly it interferes with the way I read and mark text on screen, in particular when screen sharing or pair coding. And I really don't appreciate accidental clipboard overwrites when scrolling/selecting to read text.
I understand that the TUI is mouse-aware, and I am aware that in e.g. Ghostty's config I can set mouse-shift-capture = never to make shift+click always selects text, without notifying the app, but I'd still like to prevent OC from bungling my current clipboard contents.
Proposed Solution
I guess a tui.copy_on_select config option would suffice. Keep its default as true to avoid surprising existing users.
{
"tui": {
"copy_on_select": false
}
}
Current Behavior
Mouse selection → automatic clipboard copy
Expected Behavior (when disabled)
Allows users to select text visually without side effects
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.