On Sun Dec 21 23:15:01 2025 +0000, Rémi Bernon wrote:
I've changed the code to do that but I'm not entirely sure it's the best way for compatibility, we'll see. It might be better to respect the host layout, but at the same time it's also possible that Windows applications have expectations about the layout key mapping for well known native layouts. I am reporting that the current implementation slightly differs from the Windows AltGr key behavior.
1. Examining the lparam of the WM_KEYDOWN:wparam=VK_CONTROL message reveals that the injected key is LeftControl. 2. If the LeftControl key is already pressed, the key is not injected. 3. If the RightControl key is already pressed, the VK_CONTROL WM_KEYUP message (not WM_SYSKEYUP) is injected only upon AltGr key release. 4. Examining the RAWKEYBOARD data in the WM_INPUT message, data.keyboard.MakeCode and Flags are the RightAlt value (0x38, RI_KEY_E0). The key's data.keyboard.VKey value is VK_CONTROL. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9802#note_125975