https://bugs.winehq.org/show_bug.cgi?id=56821
Bug ID: 56821 Summary: Keyboard modifiers behavior is unreliable Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winex11.drv Assignee: wine-bugs@winehq.org Reporter: rikul@inbox.ru Distribution: ---
Sometimes, modifiers are unreliable in combination with letters.
The issue stems from Wine commit made 15 years ago: https://gitlab.winehq.org/wine/wine/-/commit/a4a5a2ec121eeb2a7cd4ffbb5ba7b29... Wine attempts to sync with the Linux SCIM keyboard state, leading to scenarios where processing modifiers KeyUp events cause the state of ignoring them. Attached example shows extra WM_KEYUP message of “Shift” in combination with “e”.
Wine result: KeyDown: 16 KeyUp: 16 KeyDown: 69 KeyUp: 69 KeyUp: 16
Expected result: KeyDown: 16 KeyDown: 69 KeyUp: 69 KeyUp: 16
https://bugs.winehq.org/show_bug.cgi?id=56821
--- Comment #1 from BugSeeker rikul@inbox.ru --- Created attachment 76630 --> https://bugs.winehq.org/attachment.cgi?id=76630 Sample Application
https://bugs.winehq.org/show_bug.cgi?id=56821
Levon l@laa.am changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |l@laa.am
https://bugs.winehq.org/show_bug.cgi?id=56821
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #2 from Fabian Maurer dark.shadow4@web.de --- How does that sample application show this behavior?
https://bugs.winehq.org/show_bug.cgi?id=56821
--- Comment #3 from BugSeeker rikul@inbox.ru --- (In reply to Fabian Maurer from comment #2)
How does that sample application show this behavior?
You just need to open the test application (MFCApplication3.exe) and press a key combination with any modifier (for example, Shift+e) in the application window.
Standard Output will display the output I provided above.
The application was compiled from default MFC into VS and just a piece of code was added to print keystrokes to stdout.
The only detail: to see the order and demonstrate the problem, I add a sleep for one second before the output (simulating some kind of heavy operation) so that all the keys can be raised before the application processes them (and this is the problem that the application does not have time to process them , but Wine already reports that the key is up).
This happens partially, for example, if you quickly press and release a combination in some application and something heavy is attached to this combination in the application.
https://bugs.winehq.org/show_bug.cgi?id=56821
--- Comment #4 from Fabian Maurer dark.shadow4@web.de --- I get the delay, but no output.
https://bugs.winehq.org/show_bug.cgi?id=56821
--- Comment #5 from BugSeeker rikul@inbox.ru --- (In reply to Fabian Maurer from comment #4)
I get the delay, but no output.
I recorded a short video of how I do this.
https://bugs.winehq.org/show_bug.cgi?id=56821
--- Comment #6 from BugSeeker rikul@inbox.ru --- Created attachment 76638 --> https://bugs.winehq.org/attachment.cgi?id=76638 Video
https://bugs.winehq.org/show_bug.cgi?id=56821
--- Comment #7 from Fabian Maurer dark.shadow4@web.de --- Not sure what to tell you, I don't get any output. Fresh WINEPREFIX with "winetricks -q vcrun2015 mfc42"
https://bugs.winehq.org/show_bug.cgi?id=56821
--- Comment #8 from BugSeeker rikul@inbox.ru --- (In reply to Fabian Maurer from comment #7)
Not sure what to tell you, I don't get any output. Fresh WINEPREFIX with "winetricks -q vcrun2015 mfc42"
Yes, there really is no output if you run a compiled 64-bit application in 32-bit Wine.
I have recompiled the sample application and attached it below. Please try it now.
https://bugs.winehq.org/show_bug.cgi?id=56821
--- Comment #9 from BugSeeker rikul@inbox.ru --- Created attachment 76645 --> https://bugs.winehq.org/attachment.cgi?id=76645 Sample recompiled to x86