mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-28 18:47:41 +00:00
fix(windows): Add review suggestions
Co-authored-by: Marc Durdin <marc@durdin.net>
This commit is contained in:
parent
90eb7c77ec
commit
b6722f6a0a
3 changed files with 10 additions and 3 deletions
|
|
@ -72,8 +72,8 @@
|
|||
UINT
|
||||
//TODO: consolidate these messages -- they are probably not all required now
|
||||
wm_keyman = 0, // user message - ignore msg // I3594
|
||||
wm_keyman_keyevent = 0, // for serialized input
|
||||
wm_keyman_modifierevent = 0,
|
||||
wm_keyman_keyevent = 0, // for serialized input
|
||||
wm_keyman_modifierevent = 0, // for serialized input
|
||||
wm_kmdebug = 0, // " " " " - debugging
|
||||
|
||||
wm_keymankeydown = 0,
|
||||
|
|
|
|||
|
|
@ -202,6 +202,10 @@ LRESULT _kmnLowLevelKeyboardProc(
|
|||
if(isUp) FHotkeyShiftState &= ~Flag;
|
||||
else FHotkeyShiftState |= Flag;
|
||||
// #7337 Post the modifier state ensuring the serialized queue is in sync
|
||||
// Note that the modifier key may be posted again with wm_keyman_keyevent,
|
||||
// later in this function. This is intentional, as the wm_keyman_modifier
|
||||
// event message only updates our internal modifier state, and does not do
|
||||
// any additional processing or other serialization of the input queue.
|
||||
if (flag_ShouldSerializeInput) {
|
||||
PostMessage(ISerialKeyEventServer::GetServer()->GetWindow(), wm_keyman_modifierevent, hs->vkCode, LLKHFFlagstoWMKeymanKeyEventFlags(hs));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -485,7 +485,10 @@ private:
|
|||
input[1].ki.dwExtraInfo = EXTRAINFO_FLAG_SERIALIZED_USER_KEY_EVENT;
|
||||
input[1].ki.dwFlags = lParam & 0xFFFF;
|
||||
|
||||
if (msg == wm_keyman_keyevent){
|
||||
if (msg == wm_keyman_keyevent) {
|
||||
// We track changes to modifiers with wm_keyman_modifierevent, but only ever
|
||||
// pass them on to the app when we receive them with the wm_keyman_keyevent
|
||||
// message.
|
||||
if (!SendInput(2, input, sizeof(INPUT))) {
|
||||
DebugLastError("SendInput");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue