Middle-click paste from primary selection does not work on Hyprland/Wayland #12181
Issue DescriptionMiddle-click paste should paste from the primary selection in Ghostty. Expected BehaviorMiddle-click paste does nothing in Ghostty. The primary selection itself appears to be working.Middle-click paste does nothing in Ghostty. The primary selection itself appears to be working. Related discussion: That discussion states that on Linux, selected text should go to the selection clipboard and be pasteable with middle click. In my case, the primary selection exists and works ( Actual Behavior
Reproduction StepsVerified:
Ghostty LogsNo response Ghostty VersionOS Version InformationArch Linux (Linux only) Display ServerWayland (Linux only) Desktop Environment/Window ManagerHyprland Minimal Ghostty Configurationfont-family = Cica
font-size = 9
theme = Monokai Pro
No custom clipboard or middle-click related settings.Additional Relevant ConfigurationNo tmux involved when reproducing this issue. I acknowledge that:
|
Replies: 10 comments 5 replies
|
same here. I looked at #10616 but disabling the overlay scrollbar or even disabling the full scrollbar completely didn't make a difference, no middle click paste on ghostty (works everywhere else) |
|
Same here, cachyos, kde, wayland: middle click paste does nothing in ghostty, works everywhere else. |
|
Similarly on my Omarchy Arch system, stopped working just recently. |
|
Hitting this too on Arch + KDE Plasma (Wayland), same Ghostty 1.3.1-arch1. I think I found the root cause. It's the Fix that worked for me: Takes effect on next Ghostty launch (the setting is read once at startup, which matches @mitchellh's note in #10328 about not re-querying per The reason this is hard to find from a non-GNOME desktop: the schema is namespaced Or even some logic in Ghostty to detect that we are not in Gnome DE, so don't read |
|
benoitjpnet's workaround fixed it for me too. Thanks, that was a great find.
I think that idea is pretty cool. |
|
For reference, neovim in ghostty can't receive middle click event after this gtk/gnome update without enable |
|
Still not working after |
|
Testing with CachyOS / Niri: gsettings set org.gnome.desktop.interface gtk-enable-primary-paste trueFixed same issue, reboot was needed. |
|
How do we do that on a system without Gnome at all (and no |
Hitting this too on Arch + KDE Plasma (Wayland), same Ghostty 1.3.1-arch1. I think I found the root cause.
It's the
gtk-enable-primary-pasteGSetting. Ghostty 1.3.0 started honoring it in #10328, and on my system that key defaults tofalse— shipped that way directly bygsettings-desktop-schemas(50.0-1 here), no KDE or distro override involved. Firefox pastes fine because it implements middle-click paste itself and ignores the GTK setting; Ghostty now reads it and respects it, so it goes quiet.Fix that worked for me:
Takes effect on next Ghostty launch (the setting is read once at startup, which matches @mitchellh'…