mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 143390 Support handling WM_KEYDOWN during composition r=jmathies, a=joe
This commit is contained in:
parent
788095452d
commit
da189d241a
@ -2121,6 +2121,27 @@ nsIMM32Handler::OnKeyDownEvent(nsWindow* aWindow, WPARAM wParam, LPARAM lParam,
|
||||
IMEContext.IsValid() && !::ImmGetOpenStatus(IMEContext.get());
|
||||
}
|
||||
return PR_FALSE;
|
||||
case VK_TAB:
|
||||
case VK_PRIOR:
|
||||
case VK_NEXT:
|
||||
case VK_END:
|
||||
case VK_HOME:
|
||||
case VK_LEFT:
|
||||
case VK_UP:
|
||||
case VK_RIGHT:
|
||||
case VK_DOWN:
|
||||
// If IME didn't process the key message (the virtual key code wasn't
|
||||
// converted to VK_PROCESSKEY), and the virtual key code event causes
|
||||
// to move caret, we should cancel the composition here. Then, this
|
||||
// event will be dispatched.
|
||||
// XXX I think that we should dispatch all key events during composition,
|
||||
// and nsEditor should cancel/commit the composition if it *thinks*
|
||||
// it's needed.
|
||||
if (IsComposingOnOurEditor()) {
|
||||
// NOTE: We don't need to cancel the composition on another window.
|
||||
CancelComposition(aWindow, PR_FALSE);
|
||||
}
|
||||
return PR_FALSE;
|
||||
default:
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user