[FEATURE]: On Linux/Wayland allow pasting with middle click #2437

Open
opened 2026-02-16 17:35:37 -05:00 by yindo · 5 comments
Owner

Originally created by @spahl on GitHub (Nov 1, 2025).

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

It is possible I missed a config but on ghostty in Wayland I can't paste with middle click like in other TUI apps like lazygit.

This would be a nice to have for those of us with that muscle memory.

Originally created by @spahl on GitHub (Nov 1, 2025). ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request It is possible I missed a config but on ghostty in Wayland I can't paste with middle click like in other TUI apps like lazygit. This would be a nice to have for those of us with that muscle memory.
yindo added the opentuidiscussion labels 2026-02-16 17:35:37 -05:00
Author
Owner

@Sewer56 commented on GitHub (Nov 1, 2025):

Extra note: Works in VSCode's terminal, not in Alacritty.
Guessing it's VSC injecting it manually.

@Sewer56 commented on GitHub (Nov 1, 2025): Extra note: Works in VSCode's terminal, not in Alacritty. Guessing it's VSC injecting it manually.
Author
Owner

@spahl commented on GitHub (Nov 1, 2025):

@thdxr Is that something you'd be open to have added as is or does it need more details/discussion? I'd be happy to implement. I'd imagine that would require some opentui changes too.

@spahl commented on GitHub (Nov 1, 2025): @thdxr Is that something you'd be open to have added as is or does it need more details/discussion? I'd be happy to implement. I'd imagine that would require some opentui changes too.
Author
Owner

@itmo commented on GitHub (Nov 8, 2025):

i am having same issue in fedora 42 X11. Especially annoying when quickly copypasting error messages from tests to prompt..

@itmo commented on GitHub (Nov 8, 2025): i am having same issue in fedora 42 X11. Especially annoying when quickly copypasting error messages from tests to prompt..
Author
Owner

@m0x2A commented on GitHub (Jan 10, 2026):

I'm experiencing the same issue on CachyOS with KDE Plasma Wayland.

Environment:

  • OS: CachyOS (Arch-based)
  • Desktop: KDE Plasma Wayland
  • Terminal: Ghostty 1.2.3-arch2.1
  • Mouse paste methods that don't work:
    • Middle-Click (Primary Selection)
    • Right-Click context menu (Clipboard)
  • Paste methods that work: Shift+Insert (Clipboard)

Details:
Pasting text into OpenCode prompts doesn't work with either mouse-based clipboard mechanism available in Ghostty. Middle-Click (Primary Selection) and the Right-Click context menu (Clipboard) both fail. However, Shift+Insert works reliably. Interestingly, pasting works perfectly fine in regular Ghostty outside of OpenCode using both methods.

Additional info:

  • Copy from OpenCode works fine
  • wl-clipboard is installed and functional
  • Related: #4754 (clipboard mechanisms discussion) and #6072 (X11 variant of this issue)
@m0x2A commented on GitHub (Jan 10, 2026): I'm experiencing the same issue on CachyOS with KDE Plasma Wayland. **Environment:** - OS: CachyOS (Arch-based) - Desktop: KDE Plasma Wayland - Terminal: Ghostty 1.2.3-arch2.1 - Mouse paste methods that don't work: - Middle-Click (Primary Selection) - Right-Click context menu (Clipboard) - Paste methods that work: Shift+Insert (Clipboard) **Details:** Pasting text into OpenCode prompts doesn't work with either mouse-based clipboard mechanism available in Ghostty. Middle-Click (Primary Selection) and the Right-Click context menu (Clipboard) both fail. However, Shift+Insert works reliably. Interestingly, pasting works perfectly fine in regular Ghostty outside of OpenCode using both methods. **Additional info:** - Copy from OpenCode works fine - wl-clipboard is installed and functional - Related: #4754 (clipboard mechanisms discussion) and #6072 (X11 variant of this issue)
Author
Owner

@acidkewpie commented on GitHub (Jan 26, 2026):

Shift + middle click works when I do it in a foot terminal.

@acidkewpie commented on GitHub (Jan 26, 2026): Shift + middle click works when I do it in a foot terminal.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2437