Bug 466448

Summary: Allow forwarding mouse button events to X11 apps using "Legacy X11 App Support" page
Product: [Plasma] kwin Reporter: toadking
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: antti.savo, johannkleimusch, kde, nate
Priority: NOR    
Version: 5.27.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 6.1

Description toadking 2023-02-26 04:36:23 UTC
SUMMARY
The new "Legacy X11 App Support" feature works by forwarding keyboard keys to X11 apps, but it does not work for mouse buttons.


STEPS TO REPRODUCE
1. Open an X11 app that you can bind mouse buttons with (I'm using Discord as an example)
2. Bind an action (ex. Push-to-talk) to that mouse button
3. Focus a native Wayland app and push the bound mouse button

OBSERVED RESULT
Push-to-talk does not work

EXPECTED RESULT
Push-to-talk works

SOFTWARE/OS VERSIONS
Linux: 6.1.12-arch1-1 (64-bit)
KDE Plasma Version: 5.27.1
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Joystick button events also don't get passed to X11 apps but I'm not sure if that's something that should be handled here as well.
Comment 1 kde 2023-06-20 06:41:01 UTC
Also CapsLock key only works in "always" option.
Comment 2 Antti Savolainen 2023-10-26 00:23:36 UTC
I'll chime in on this issue as I would really like to be able to use mouse buttons as push-to-talk
Comment 3 Johann Kleimusch 2023-11-02 11:53:21 UTC
This is extremely important for wayland adoption for me so I would like to see this resolved.
(This should have been done before keyboard support since it doesn't conflict with the security considerations of the limitation [to prevent keyloggers etc.] in the first place)
Comment 4 Bug Janitor Service 2023-11-02 19:20:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4595
Comment 5 Oliver Beard 2024-02-27 13:46:34 UTC
Git commit 183637502d6f081f470a6ea1f99b69f882af68bb by Oliver Beard.
Committed on 27/02/2024 at 13:34.
Pushed by davidedmundson into branch 'master'.

xwayland: Add option to additionally eavesdrop on mouse buttons

M  +3    -0    src/kcms/xwayland/kwinxwaylandsettings.kcfg
M  +25   -18   src/kcms/xwayland/ui/main.qml
M  +3    -0    src/kwin.kcfg
M  +11   -0    src/options.cpp
M  +11   -0    src/options.h
M  +9    -0    src/wayland/pointer.cpp
M  +2    -0    src/wayland/pointer.h
M  +39   -10   src/xwayland/xwayland.cpp

https://invent.kde.org/plasma/kwin/-/commit/183637502d6f081f470a6ea1f99b69f882af68bb