зеркало из https://github.com/mozilla/gecko-dev.git
Bug 892606 part.2 Fix scancode value in lParam generated by KeyboardLayout::SynthesizeNativeKeyEvent() r=jimm
This commit is contained in:
Родитель
07452df7f5
Коммит
f29b3580a9
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче