Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/wayland_keyboard.c:
/* Skip left/right-agnostic modifier vkeys. */ if (vkey == VK_SHIFT || vkey == VK_CONTROL || vkey == VK_MENU) continue;
- if (state[vkey] & 0x80) - { - UINT scan = NtUserMapVirtualKeyEx(vkey, MAPVK_VK_TO_VSC_EX, - keyboard_hkl); - input.ki.wVk = vkey; - input.ki.wScan = scan & 0xff; - input.ki.dwFlags = KEYEVENTF_KEYUP; - if (scan & ~0xff) input.ki.dwFlags |= KEYEVENTF_EXTENDEDKEY; - NtUserSendHardwareInput(hwnd, 0, &input, 0); - }
Fwiw, I probably missed that previously and it may be what Wayland spec suggest, but I also don't think we should send key release input when focus is lost. That's not what Windows does. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5712#note_71275