SUMMARY xwayland keyboard grabs don't work, which affects apps like vmware, passing the shortcuts of the virtual machine to the host This bug was reported before and supposedly fixed in Bug 455159, but the problem still persists OBSERVED RESULT Keyboard shortcuts get passed to the host EXPECTED RESULT Keyboard shortcuts don't get passed to the host SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.3.4 KDE Frameworks Version: 6.12.0 Qt Version: 6.8.3 Kernel Version: 6.13.8-zen1-1-zen (64-bit) Graphics Platform: Wayland Processors: 20 × 12th Gen Intel® Core™ i7-12700H Memory: 31.0 GiB of RAM ADDITIONAL INFORMATION
Hello, so to get this issue going I will try to explain how this gets handled in gnome to find if there is a qdbus equivalent . Gnome handles keyboard capture through GSettings, which comes with the GTK package. There is an option in mutter to allow key grabs which gets enabled by doing the following gsettings set org.gnome.mutter.wayland xwayland-allow-grabs "true" gsettings set org.gnome.mutter.wayland xwayland-grab-access-rules "['vmplayer','vmware-vmx','mksSandbox']" of course this won't on kwin as it doesn't get configured through gsettings and if it was configured through gsettings i doubt the option would have the name, so I am wondering if there is a qdbus equivalent for this command to rectify the issue for the xwayland grabs in vmware
Created attachment 181906 [details] Video demonstrating the issue Here i am pressing the meta key while "being grabbed" by the guest, the key press shouldn't get passed to the host, but it does
Hi! While I'm not a VMware user, it seems like this is a widely-experienced issue with that software across Wayland compositors: https://community.broadcom.com/vmware-cloud-foundation/question/wayland-support#16dabab5-9203-460b-9e74-019745d204cd https://www.reddit.com/r/gnome/comments/rwfm19/grab_keyboard_input_in_vmware_with_wayland_in/ https://www.reddit.com/r/vmware/comments/15ln1ap/vmware_workstation_17_on_debian_question/ If what you described on GNOME/Mutter is a workaround to force global shortcuts to be passed through to an application, then KWin would have an equivalent workaround with the Window rule to "Ignore global shortcuts". If there's information indicating that there's an issue unique to KWin here, please feel free to reopen. Thanks!
> equivalent workaround with the Window rule to "Ignore global shortcuts". The thing is that the ignore global shortcuts window rule is a hack(not real keyboard grabbing like in x11 or the gnome workaround) and makes it extremely annoying to deal with vmware as you would have to either close vmware or open another application to get access to the keyboard shortcuts, which becomes problematic while multitasking. If you would like a video demonstrating the behavior with the ignore global shortcuts rule I would be happy to send it. >If there's information indicating that there's an issue unique to KWin here, please feel free to reopen. Thanks! My theory is that xwayland keyboard grabbing is broken on KDE hence the current behavior, unfortunately i don't know of any other xwayland app that does keyboard grabbing to be able to test it on.
ignore my previous comment after reading this post: >https://community.broadcom.com/vmware-cloud-foundation/question/wayland-support#16dabab5-9203-460b-9e74-019745d204cd it seems like Workstation won't work properly unless it gets ported to Wayland. Thank you for your time.