Bug 892606 part.2 Fix scancode value in lParam generated by KeyboardLayout::SynthesizeNativeKeyEvent() r=jimm

This commit is contained in:
Masayuki Nakano 2013-08-14 11:09:38 +09:00
Родитель 07452df7f5
Коммит f29b3580a9
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -2285,8 +2285,8 @@ KeyboardLayout::SynthesizeNativeKeyEvent(nsWindowBase* aWidget,
}
::SetKeyboardState(kbdState);
ModifierKeyState modKeyState;
UINT scanCode = ComputeScanCodeForVirtualKeyCode(
argumentKeySpecific ? argumentKeySpecific : aNativeKeyCode);
UINT scanCode =
ComputeScanCodeForVirtualKeyCode(keySpecific ? keySpecific : key);
LPARAM lParam = static_cast<LPARAM>(scanCode << 16);
// Add extended key flag to the lParam for right control key and right alt
// key.
@ -2340,8 +2340,8 @@ KeyboardLayout::SynthesizeNativeKeyEvent(nsWindowBase* aWidget,
}
::SetKeyboardState(kbdState);
ModifierKeyState modKeyState;
UINT scanCode = ComputeScanCodeForVirtualKeyCode(
argumentKeySpecific ? argumentKeySpecific : aNativeKeyCode);
UINT scanCode =
ComputeScanCodeForVirtualKeyCode(keySpecific ? keySpecific : key);
LPARAM lParam = static_cast<LPARAM>(scanCode << 16);
// Add extended key flag to the lParam for right control key and right alt
// key.

Просмотреть файл

@ -304,7 +304,7 @@ public:
msg.hwnd = aWnd;
msg.message = mIsDeadKey ? WM_DEADCHAR : WM_CHAR;
msg.wParam = static_cast<WPARAM>(mCharCode);
msg.lParam = static_cast<LPARAM>(mScanCode);
msg.lParam = static_cast<LPARAM>(mScanCode << 16);
msg.time = 0;
msg.pt.x = msg.pt.y = 0;
return msg;