http://bugs.winehq.org/show_bug.cgi?id=21307
Summary: Keyboard layout error on IDA Pro 4.9 Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: cerebro.alexiel@gmail.com
Launching IDA Pro Freeware with wine pops up an "Information" box saying "Keyboard layout error: Failed to get the scan code of '#' (VkKeyScan failure)".
After clicking 'OK', the same message appears but with '~' instead of '#'.
Then IDA opens and runs correctly.
Note that I'm using wine-1.1.36 and IDA from http://www.hex-rays.com/idapro/idadownfreeware.htm.
My `locale` is 'fr_FR.UTF-8' and this bug may be related to the 19486 one.
Hopefully, the message is clear enough to understand what's wrong.
http://bugs.winehq.org/show_bug.cgi?id=21307
--- Comment #1 from Alex cerebro.alexiel@gmail.com 2010-01-10 05:50:58 --- Created an attachment (id=25644) --> (http://bugs.winehq.org/attachment.cgi?id=25644) The 'information' dialog box
http://bugs.winehq.org/show_bug.cgi?id=21307
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
--- Comment #2 from Austin English austinenglish@gmail.com 2010-01-10 12:00:38 --- Do those keys work in wine notepad?
http://bugs.winehq.org/show_bug.cgi?id=21307
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.1.36
http://bugs.winehq.org/show_bug.cgi?id=21307
--- Comment #3 from Alex cerebro.alexiel@gmail.com 2010-01-11 13:53:15 --- In wine notepad I can display # and ~ characters.
I also tried common ones with and without accents, capitals ...etc and there is no problem except some of them : ẽ and € which are replaced by a kind of 'l' but smaller (see screenshot below)
There is no output when running notepad.
But if you need some WINEDEBUG= verbose log, just tell me.
http://bugs.winehq.org/show_bug.cgi?id=21307
--- Comment #4 from Alex cerebro.alexiel@gmail.com 2010-01-11 13:54:02 --- Created an attachment (id=25674) --> (http://bugs.winehq.org/attachment.cgi?id=25674) What notepad can and cannot display
http://bugs.winehq.org/show_bug.cgi?id=21307
--- Comment #5 from Alex cerebro.alexiel@gmail.com 2010-01-15 12:29:20 --- Created an attachment (id=25742) --> (http://bugs.winehq.org/attachment.cgi?id=25742) A simple testcase
I did WINEDEBUG=+relay wine idag.exe > relay.log 2>&1 and found this 0009:Call user32.VkKeyScanA(00000023) ret=00442274 0009:Ret user32.VkKeyScanA() retval=0000ffff ret=00442274 <blabla> 0009:Call user32.DrawTextA(000005cc,00c75594 "Keyboard layout error:\nFailed to get the scan code of '#'\n(VkKeyScan failure)",0000004d,0032d2cd,00000440) ret=400c8610
So VkKeyScanA('#') fails as described in the message.
Compiling the testcase on windows (XP, cygwin, gcc) gives VkKeyScanA('#') :: 1587
IsDBCSLeadByte('#') :: 0 cChar # Wchar # VkKeyScanExW() :: 1587
and on my system (KUbuntu, winegcc) : VkKeyScanA('#') :: -1
IsDBCSLeadByte('#') :: 0 cChar # Wchar # VkKeyScanExW() :: 65535
So USER_Driver->pVkKeyScanEx(cChar, dwhkl) fails.
http://bugs.winehq.org/show_bug.cgi?id=21307
--- Comment #6 from Alex cerebro.alexiel@gmail.com 2010-01-21 10:07:23 --- I found some interesting traces using
WINEBUG=+key X11DRV_KEYBOARD_DetectLayout mismatch for keysym 0x0000, keycode 10, got &1&1 ... and several other lines as this one
Don't know if it's a normal behavior but the keysym 0 seems to be associated with all others. And I'm wondering if '&1&1' is not a buffer bug.
WINEDEBUG=+keyboard X11DRV_KEYBOARD_DetectLayout Attempting to match against "VNC keyboard layout" X11DRV_KEYBOARD_DetectLayout detected layout is "French keyboard layout" X11DRV_VkKeyScanEx '#'(0x23, 35): got keycode 0x0c (12) X11DRV_VkKeyScanEx wChar 0x23 -> cChar '#' X11DRV_InitKeyboard No more vkeys available! X11DRV_InitKeyboard vkey 0035 is being used by more than one keycode ...and others vkey X11DRV_KEYBOARD_DetectLayout 10 keysyms per keycode not supported, set to 4 X11DRV_VkKeyScanEx Keysym 23 not found while parsing the keycode table
What's strange is the last line saying the keysym was not found whereas the same function got a keycode with this keysym...
http://bugs.winehq.org/show_bug.cgi?id=21307
--- Comment #7 from Vitaliy Margolen vitaliy@kievinfo.com 2010-01-31 11:24:39 --- Probably has something to do that there is no "#" character in Wine's French keyboard layout. And I can't find it either when setting keyboard layout to FR.
http://bugs.winehq.org/show_bug.cgi?id=21307
--- Comment #8 from Alex cerebro.alexiel@gmail.com 2010-01-31 12:47:22 --- So I guess it should be
/*** French keyboard layout (setxkbmap fr) */ static const char main_key_FR[MAIN_LEN][4] = { "²","&1","é2~",""3#","'4{","(5[","-6|","è7`","_8\","ç9^","à0@",")°]","=+}", [...] .
However, a comment above does not recommend adding these AltGr keys to the table. But what's a keyboard without {} [] | or @ ?
http://bugs.winehq.org/show_bug.cgi?id=21307
--- Comment #9 from Alex cerebro.alexiel@gmail.com 2010-02-03 15:16:43 --- Thanks to vitamin, we now know where the bug comes from : X. In fact, XKeycodeToKeysym seems to be deprecated (²) so we should use XkbKeycodeToKeysym instead.
The fix is easy and may resolve some other bugs.
-- ² http://bugs.freedesktop.org/show_bug.cgi?id=5349
http://bugs.winehq.org/show_bug.cgi?id=21307
Jörg Höhle hoehle@users.sourceforge.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hoehle@users.sourceforge.ne | |t
--- Comment #10 from Jörg Höhle hoehle@users.sourceforge.net 2010-04-29 03:39:44 --- Is this a duplicate of bug #19486 yet more revealing? There seems to be something particular about French keyboards.
http://bugs.winehq.org/show_bug.cgi?id=21307
--- Comment #11 from Alex cerebro.alexiel@gmail.com 2010-04-29 13:25:32 --- I think they're related but actually I don't know. Once this one will be solved, I'll test the other and we'll know.
Is it specific to French keyboards ? In fact, this bug shows that wine currently doesn't use the XKB extension when available to find and check keysyms and keycodes. It affects all keyboards using at least AltGr modifier.
If you read wine-devel, you know that I've sent a patch which is still waiting comments.
http://bugs.winehq.org/show_bug.cgi?id=21307
quasi-anonymous user from bugmenot.com winehqbugs@bugmenot.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winehqbugs@bugmenot.com
--- Comment #12 from quasi-anonymous user from bugmenot.com winehqbugs@bugmenot.com 2010-05-06 11:03:00 --- *** Bug 19486 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=21307
Alex cerebro.alexiel@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #13 from Alex cerebro.alexiel@gmail.com 2010-05-06 11:04:20 --- Fixed by http://source.winehq.org/git/wine.git?a=commit;h=a30b94651d9f01b4bfa9afd073b...
Closing
http://bugs.winehq.org/show_bug.cgi?id=21307
--- Comment #14 from Jörg Höhle hoehle@users.sourceforge.net 2010-05-07 03:17:03 ---
However, a comment above does not recommend adding these AltGr keys to the
table.
But what's a keyboard without {} [] | or @ ?
I hope the comments now in the source make it clear: +/* These tables serve to guess the keyboard type and scancode mapping. + Complete modeling is not important, identification/discrimination is. */
E.g. a keyboard definition with only 'AZERTY' and all other keys left as \0 in theory would be enough to recognize for sure a French keyboard (Swiss, Canadians etc. please ignore). In practice, this wouldn't work because the other definitions contain more matching keys. The tables do not implement a minimal discrimination tree.
The keyboard is not lacking [] | @ etc. as you can verify with Wine's notepad. These are just not essential to identify a French keyboard. Furthermore, being to precise may backfire, as the next comment explains (about the German keyboard): + * Keys reachable via AltGr (@, [], ~, , |, {}) differ completely + * among PC and Mac keyboards, so these are not listed. I have no idea what a French Mac keyboard looks like.
http://bugs.winehq.org/show_bug.cgi?id=21307
--- Comment #15 from Alex cerebro.alexiel@gmail.com 2010-05-07 10:51:14 --- Thanks for these precisions !
I have no idea what a French Mac keyboard looks like.
If you're curious or interested I found http://support.apple.com/kb/HT1171?viewlocale=fr_FR&locale=fr_FR
http://bugs.winehq.org/show_bug.cgi?id=21307
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #16 from Alexandre Julliard julliard@winehq.org 2010-05-07 13:29:52 --- Closing bugs fixed in 1.1.44.