http://bugs.winehq.org/show_bug.cgi?id=10549
Summary: GetKeyNameText returns different text from Windows Product: Wine Version: 0.9.46. Platform: Other OS/Version: Linux Status: UNCONFIRMED Severity: trivial Priority: P2 Component: wine-misc AssignedTo: wine-bugs@winehq.org ReportedBy: djq@kerridge.com
In our app we generate accelerator text using the virtual key code of the accelerator key and a couple of shift flags. e.g. a menu item's text would say something like 'Do Stuff CTRL+D'
Under Wine for certain keys which appear both on the left and right of the keyboard, in this case Alt, Shift and Ctrl. The text returned is specific to the left/right scan code. This differs from Windows.
So our menu item will read something like 'Do Stuff Control_L+D' which is a little ugly and implies you have to use the left Ctrl key.
Code snippet:
TCHAR szText[64]; LONG lParam;
// MapVirtualKey returns the scan code for the left control key. // Left shift for the call to GetKeyNameText lParam = MapVirtualKey(VK_CONTROL, 0) << 16;
// The string returned by GetKeyNameText on Windows does not differentiate // between right and left and is 'CTRL' or 'Ctrl' depending on the Windows Version // Under Wine it returns 'Control_L' GetKeyNameText(lParam, szText, sizeof(szText)/sizeof(szText[0]));
http://bugs.winehq.org/show_bug.cgi?id=10549
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|trivial |enhancement Component|wine-misc |wine-x11driver
--- Comment #1 from Vitaliy Margolen vitaliy@kievinfo.com 2007-11-23 11:51:17 --- This is what they are named in X11. MSDN does not spec what those names should be. Also how are you dealing with international versions?
So I'd say this bug is a wontfix - this part is just different and your app have to cope with that. If you want "pretty names" do name mapping yourself.
http://bugs.winehq.org/show_bug.cgi?id=10549
David Quinn djq@kerridge.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |trivial Component|wine-x11driver |wine-misc
--- Comment #2 from David Quinn djq@kerridge.com 2007-11-23 12:02:43 --- (In reply to comment #1) OK then. No biggie I can map the names myself.
BTW we did it this way to avoid internationalisation issues since the text that comes back should already be localised to the Windows locale.
http://bugs.winehq.org/show_bug.cgi?id=10549
Alexander Nicolaysen Sørnes alex@thehandofagony.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alex@thehandofagony.com Severity|trivial |enhancement Status|UNCONFIRMED |NEW Component|wine-misc |wine-x11driver Ever Confirmed|0 |1
--- Comment #3 from Alexander Nicolaysen Sørnes alex@thehandofagony.com 2007-11-23 12:10:13 --- I agree this is broken app behaviour. but since the text returned is defined by the keyboard driver, and most Windows boxes will be using the standard Windows one, this is an issue we might have to replicate. By the way this text is localized, at least on my Norwegian Windows version.
http://bugs.winehq.org/show_bug.cgi?id=10549
--- Comment #4 from Alexander Nicolaysen Sørnes alex@thehandofagony.com 2007-11-25 10:53:04 --- I'm curious, why don't you set the "don't care" bit?
http://bugs.winehq.org/show_bug.cgi?id=10549
--- Comment #5 from David Quinn djq@kerridge.com 2007-11-25 11:26:49 --- (In reply to comment #4)
I thought about that, but Windows returns the base key name without it so I left it out of the snippet. To be honest I don't think it's actually set in the app when it really should be...
http://bugs.winehq.org/show_bug.cgi?id=10549
--- Comment #6 from Austin English austinenglish@gmail.com 2008-06-12 13:07:53 --- Is this still an issue in current (1.0-rc4 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=10549
--- Comment #7 from David Quinn djq@kerridge.com 2008-06-13 03:53:39 --- It still happens, but I'm mapping the key names myself now so it's not a big deal for me personally.
http://bugs.winehq.org/show_bug.cgi?id=10549
--- Comment #8 from Austin English austinenglish@gmail.com 2008-12-11 10:31:44 --- Is this still an issue in current (1.1.10 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=10549
--- Comment #9 from David Quinn djq@kerridge.com 2008-12-11 11:12:10 --- (In reply to comment #8) It still happens but we're mapping the strings ourselves now so it's not a problem for us any more.
http://bugs.winehq.org/show_bug.cgi?id=10549
--- Comment #10 from Austin English austinenglish@gmail.com 2008-12-11 11:57:33 --- A conformance test would be helpful.
http://bugs.winehq.org/show_bug.cgi?id=10549
--- Comment #11 from Austin English austinenglish@gmail.com 2009-06-10 11:34:06 --- Abandoned. If this is still an issue in current wine and you can provide the needed information, feel free to reopen.
http://bugs.winehq.org/show_bug.cgi?id=10549
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |ABANDONED
--- Comment #12 from Austin English austinenglish@gmail.com 2009-06-10 11:36:13 --- For real this time.
http://bugs.winehq.org/show_bug.cgi?id=10549
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Austin English austinenglish@gmail.com 2009-06-10 11:37:59 --- Closing.