http://bugs.winehq.org/show_bug.cgi?id=28670
Bug #: 28670 Summary: GetKeyboardLayout(0) returns wrong HKL Product: Wine Version: 1.3.30 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 AssignedTo: wine-bugs@winehq.org ReportedBy: Sebastian.Riemer@gmx.de Classification: Unclassified
Created attachment 36849 --> http://bugs.winehq.org/attachment.cgi?id=36849 Patch for get_keyboard_layout_name() in dlls/user32/tests/input.c
I was improving a test in dlls/user32/input.c and while testing the test I've found out that GetKeyboardLayout(0) doesn't return the HKL of the currently set keyboard layout but instead the currently selected locale.
===Example=== WindowsXP: French language with German keyboard layout: HKL = 0x407040c wine 1.3.30: French language with German keyboard layout: HKL = 0x40c040c
The keyboard layout is in the high word and the locale in the low word. So, Windows XP reports correctly, that I have a German keyboard layout set but conversely wine 1.3.30 reports French, although "setxkbmap de nodeadkeys" is set.
http://bugs.winehq.org/show_bug.cgi?id=28670
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Severity|normal |minor
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru 2011-10-12 03:56:44 CDT --- That's because support for keyboard layouts in Wine is completely missing.
http://bugs.winehq.org/show_bug.cgi?id=28670
--- Comment #2 from Sebastian Riemer Sebastian.Riemer@gmx.de 2011-10-12 15:31:40 CDT --- (In reply to comment #1)
That's because support for keyboard layouts in Wine is completely missing.
(UINT)main_key_tab[kbd_layout].lcid << 16 | (UINT)langid could be returned. There is a FIXME in the code regarding this.
So, for now I can't determine for sure in tests which keyboard layout is currently set. That's bad.
http://bugs.winehq.org/show_bug.cgi?id=28670
--- Comment #3 from Dmitry Timoshkov dmitry@baikal.ru 2011-10-12 23:36:16 CDT --- It's pretty hard (if not impossible) to properly implement keyboard layouts without support from X11, and X11 doesn't help in that area.
http://bugs.winehq.org/show_bug.cgi?id=28670
--- Comment #4 from Sebastian Riemer Sebastian.Riemer@gmx.de 2011-10-13 00:53:52 CDT --- (In reply to comment #3)
It's pretty hard (if not impossible) to properly implement keyboard layouts without support from X11, and X11 doesn't help in that area.
This is not what I mean. I only want that it reports a current HKL which is comparable to the way Windows does it to the applications. Internally wine can/should do what ever is best.
The Function "X11DRV_KEYBOARD_DetectLayout" compares the stuff in "main_key_tab" with X11 and sets "kbd_layout" index to the correct place. So, we already have the layout to report to the outside in main_key_tab[kbd_layout].lcid. Probably a reverse mapping is needed from HKL to index in main_key_tab. But that's it.
http://bugs.winehq.org/show_bug.cgi?id=28670
--- Comment #5 from Austin English austinenglish@gmail.com 2011-10-13 13:21:20 CDT --- (In reply to comment #3)
It's pretty hard (if not impossible) to properly implement keyboard layouts without support from X11, and X11 doesn't help in that area.
File a bug with x.org?
http://bugs.winehq.org/show_bug.cgi?id=28670
--- Comment #6 from Dmitry Timoshkov dmitry@baikal.ru 2011-10-13 22:28:20 CDT --- (In reply to comment #5)
(In reply to comment #3)
It's pretty hard (if not impossible) to properly implement keyboard layouts without support from X11, and X11 doesn't help in that area.
File a bug with x.org?
x.org doesn't provide standards, it's just an implementation.
http://bugs.winehq.org/show_bug.cgi?id=28670
--- Comment #7 from Austin English austinenglish@gmail.com 2013-11-13 16:50:04 CST --- This is your friendly reminder that there has been no bug activity for 2 years. Is this still an issue in current (1.7.6 or newer) wine? If so, please attach the terminal output in 1.7.6 (see http://wiki.winehq.org/FAQ#get_log).
https://bugs.winehq.org/show_bug.cgi?id=28670
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |ABANDONED
--- Comment #8 from Austin English austinenglish@gmail.com --- Abandoned.
https://bugs.winehq.org/show_bug.cgi?id=28670
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Austin English austinenglish@gmail.com --- Closing.