When using a libvirt-spice virtual machine with keyboard grabbing disabled every combination of the Windows key is passed to the application triggering the start menu in Windows after key release. This is the case for both existing and not existing shortcuts. For example: I use Win+1,2,3 to switch between the virtual desktops. For this to work I disabled the qemu keyboard grabbing. On desktop 1 pressing Win+2 switches to desktop 2, but a single Windows key press is sent to the VM window triggering actions in the guest os. Expected result: after key release (if there is no global shortcut set for that combination) the windows key press is not sent to the VM. Note: This doesn't happen under gnome-shell X11 session.
Slight correction: if there is a global shortcut that kwin reacted to then the modifier shouldn't get passed to the active application.
I'm sorry, but there is nothing KWin can do about. Global shortcut handling is provided by kglobalaccel. But even kglobalaccel cannot do anything about it. The key press of the modifier is always sent, only the key press of the key which triggered the global shortcut will be hidden from applications, but the key release is then sent again. There is really nothing we can do about it. But libvirt can react on it. It gets an event that the another client grabbed the keyboard. In this case it should dismiss all the pressed events. I would recommend to change the shortcuts to not use win-modifier.
The only thing I don't understand is if this is so impossible then why this is working under Gnome?
(In reply to adikurthy from comment #3) > The only thing I don't understand is if this is so impossible then why this > is working under Gnome? Because GNOME has a different implementation of global shortcut handling with probably different bugs.