Skip to content

fix(tui): support middle-click paste from X11 primary selection#16379

Open
linuxhd0 wants to merge 1 commit intoanomalyco:devfrom
linuxhd0:fix/middle-click-paste
Open

fix(tui): support middle-click paste from X11 primary selection#16379
linuxhd0 wants to merge 1 commit intoanomalyco:devfrom
linuxhd0:fix/middle-click-paste

Conversation

@linuxhd0
Copy link

@linuxhd0 linuxhd0 commented Mar 6, 2026

Issue for this PR

Closes #8915

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

It allows someone on Linux (Xorg, Wayland) to select text in one application and use the middle mouse button to paste into the prompt textbox without have to do ctrl-c + ctrl-v. This is common behaviour on Linux systems.

How did you verify your code works?

I ran bun dev after making the changes, selected some text in another terminal and pasted it into opencode and it worked. Without the fix, you don't get anything indication that anything at all happened in opencode.

I use Xorg, didn't try Wayland though.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate PRs Found

  1. PR fix: enable primary clipboard copy for Wayland/X11 to fix Linux middle-click paste #6370: "fix: enable primary clipboard copy for Wayland/X11 to fix Linux middle-click paste"

  2. PR feat(opencode): add linux clipboard toast warnings  #10332: "feat(opencode): add linux clipboard toast warnings"

These PRs appear to be addressing the same or very similar issue regarding middle-click paste support on Linux systems.

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.

On konsole, middle button press does not paste

1 participant