graphic: 0.822 device: 0.767 peripherals: 0.666 architecture: 0.642 user-level: 0.577 files: 0.577 hypervisor: 0.556 kernel: 0.553 performance: 0.543 debug: 0.531 ppc: 0.526 semantic: 0.522 risc-v: 0.514 mistranslation: 0.491 socket: 0.455 PID: 0.419 permissions: 0.407 vnc: 0.403 boot: 0.369 register: 0.294 network: 0.292 arm: 0.289 assembly: 0.278 TCG: 0.230 VMM: 0.218 x86: 0.187 i386: 0.185 virtual: 0.168 KVM: 0.089 Win/Super key not working correctly under Windows hosts Description of problem: I accidentally noticed `Win` key (VK_LWIN) not working correctly on Windows hosts, more specifically: 1. It is impossible to "hold" `Win`. If one presses and holds `Win`, the guest is spammed with `Win` keypresses, instead of receiving a single `Win` keypress at the point of releasing the button (VK_LWIN button up). 2. It is impossible to make key combinations (shortcuts, hotkeys etc.) that involve the `Win/Super` key. Maybe implicitly solved by fixing #1. This behavior is present starting from bc8e883065f36581e4f2352c31a1dfa5f65a82f2 (ui/sdl2: disable SDL_HINT_GRAB_KEYBOARD on Windows). Before it, on the SDL2 keyboard hook `Win/Super` key worked correctly. I demonstrate the problem on Fedora/WinXP, but it affects all guests. Steps to reproduce: 1. (see additional information) 2. 3. Additional information: Short video demonstration on a WinXP guest and a Fedora 39 guest. The qemus used are (qemu-8.0.2 e0968d21e27ef9c406f709180a39a076e786efbe; working correctly) and (qemu-9.0.0 from the release tarball qemu-9.0.0.tar.xz; buggy) 1. In the WinXP video, I'm pressing and holding the `Win` key for about 3 seconds. In the correct version, the start menu is opened only at the point of release. In the buggy version, the start menu is opened repeatedly tens of times (flickering). You can see the point of release in Nirsoft's KeyboardStateView, when VK_LWIN loses the "pressed" asterisk. At the end of the video I'm trying to use the `Win+e` shortcut for WinExplorer. In the buggy version, Outlook is opened instead. This is because the keypresses are processed individually, first `Win` opens the start menu and then `e` opens email application (in this case outlook). In the correct version WinExplorer is opened. ![winxp-ok](/uploads/a8b621552c0a395766a42345654a2e01/winxp-ok.mp4) ![winxp-buggy](/uploads/14b73486b6d58f643baf3370d8d19eaf/winxp-buggy.mp4) 2. In the Fedora video, I'm trying to set up a simple shortcut, I'm pressing on my keyboard `LCTRL+LALT+Super+E`. In the buggy version, the `Super` key is not picked up. All the shortcut combinations involving `Super` are therefore not working. ![fedora39-ok](/uploads/0704293eeecfce9fb2061b8d5a5ee36f/fedora39-ok.mp4) ![fedora39-buggy](/uploads/fb623fa226dcb908ea6fa685d4f792e3/fedora39-buggy.mp4)