https://bugs.winehq.org/show_bug.cgi?id=50197
Bug ID: 50197 Summary: cmd and winedbg: Unable to insert some chars (*, _) with de-adnw keyboard layout Product: Wine Version: 5.22 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winedbg Assignee: wine-bugs@winehq.org Reporter: joachim.priesner.bugs@web.de Distribution: ---
To reproduce:
$ setxkbmap de adnw
Press Caps Lock + "G" (on a US keyboard) -> An asterisk "*" is inserted.
$ wine winedbg or $ wine cmd
Press Caps Lock + "G" again. Expected: An asterisk "*" is inserted Actual: The input is ignored.
The same thing happens when trying to copy-paste an asterisk character from another application.
Effectively, I am unable to insert some characters like _ and * in winedbg.
I bisected the issue to the following commit:
commit 54e117018cd4cc58c258da92686bfad13946bde2 Author: Jacek Caban jacek@codeweavers.com Date: Mon Sep 21 17:07:29 2020 +0200
kernelbase: Use conhost to handle Unix consoles.
Maybe the following lines in programs/conhost/conhost.c are responsible:
+ if (ir.Event.KeyEvent.uChar.UnicodeChar && !(ir.Event.KeyEvent.dwControlKeyState & LEFT_ALT_PRESSED)) + edit_line_insert( console, &ir.Event.KeyEvent.uChar.UnicodeChar, 1 );
introduced by commit 01d203eebf60a4f07be658e6a66d50909c90cf75 Author: Jacek Caban jacek@codeweavers.com Date: Mon Sep 14 18:46:04 2020 +0200
conhost: Introduce IOCTL_CONDRV_READ_CONSOLE ioctl.
It seems that the LEFT_ALT_PRESSED flag is set for that particular key combination although I did not press the left alt key (but rather Caps Lock).
https://bugs.winehq.org/show_bug.cgi?id=50197
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jacek@codeweavers.com Keywords| |download, regression Component|winedbg |kernel32 Regression SHA1| |54e117018cd4cc58c258da92686 | |bfad13946bde2
https://bugs.winehq.org/show_bug.cgi?id=50197
--- Comment #1 from Jacek Caban jacek@codeweavers.com --- Pease attach +console,+key,+keyboard logs.
https://bugs.winehq.org/show_bug.cgi?id=50197
--- Comment #2 from Joachim Priesner joachim.priesner.bugs@web.de --- Created attachment 68734 --> https://bugs.winehq.org/attachment.cgi?id=68734 +console,+key,+keyboard log of running "wine cmd" and inserting a * character
https://bugs.winehq.org/show_bug.cgi?id=50197
--- Comment #3 from Jacek Caban jacek@codeweavers.com --- It looks like VkKeyScanW indeed reports LEFT_ALT_PRESSED, which we skip later when processing edition events. This check was ported from old kernel32 code, but the old code didn't use VkKeyScanW. I wonder if VkKeyScanW should be fixed or should we allow LEFT_ALT_PRESSED in process_console_input().
https://bugs.winehq.org/show_bug.cgi?id=50197
--- Comment #4 from Jacek Caban jacek@codeweavers.com --- Created attachment 68742 --> https://bugs.winehq.org/attachment.cgi?id=68742 fix
Does the attached patch help?
https://bugs.winehq.org/show_bug.cgi?id=50197
--- Comment #5 from Joachim Priesner joachim.priesner.bugs@web.de --- Yes, it does.
https://bugs.winehq.org/show_bug.cgi?id=50197
Jacek Caban jacek@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |90cdea1b65f9f3787b71395a41d | |30556c688a24f
--- Comment #6 from Jacek Caban jacek@codeweavers.com --- The patch is in git: https://source.winehq.org/git/wine.git/commitdiff/90cdea1b65f9f3787b71395a41...
Thanks for the report.
https://bugs.winehq.org/show_bug.cgi?id=50197
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.0-rc1.