зеркало из https://github.com/mozilla/gecko-dev.git
r=brendan, a=brendan We were doing bad things to the OS/2 character code before we gave it to XP
This commit is contained in:
Родитель
797dbb5b02
Коммит
bc1815218f
|
@ -361,8 +361,11 @@ int nsWidgetModuleData::TranslateKey( VSCAN scan, UniChar *pChar, VDKEY *vdkey)
|
|||
ULONG sstate = 0;
|
||||
|
||||
if( WinIsKeyDown(VK_SHIFT)) sstate |= KBD_SHIFT;
|
||||
if( WinIsKeyDown(VK_CTRL)) sstate |= KBD_CTRL;
|
||||
if( WinIsKeyDown(VK_ALT)) sstate |= KBD_ALT;
|
||||
// We should not be passing these to UniTranslateKey because they affect the char code.
|
||||
// We want the actual key that is being pressed. Passing Ctrl+A to UniTranslateKey
|
||||
// returns the ASCII code for Ctrl+A
|
||||
// if( WinIsKeyDown(VK_CTRL)) sstate |= KBD_CTRL;
|
||||
// if( WinIsKeyDown(VK_ALT)) sstate |= KBD_ALT;
|
||||
if( WinIsKeyDown(VK_ALTGRAF)) sstate |= KBD_ALTGR;
|
||||
|
||||
#define TOGGLED(vk) (WinGetKeyState(HWND_DESKTOP,vk) & 1)
|
||||
|
|
|
@ -2634,10 +2634,7 @@ PRUint32 WMChar2KeyCode( MPARAM mp1, MPARAM mp2)
|
|||
|
||||
if( rc < 0xFF)
|
||||
{
|
||||
// Need nls-correct way of doing this...
|
||||
if( isalnum( rc))
|
||||
rc = toupper( rc); // no lower case
|
||||
else switch( rc)
|
||||
switch( rc)
|
||||
{
|
||||
case ';': rc = NS_VK_SEMICOLON; break;
|
||||
case '=': rc = NS_VK_EQUALS; break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче