From: Pierre Ossman Date: Fri, 20 Nov 2020 09:51:25 +0000 (+0100) Subject: Fake key release events for some Japanese keys X-Git-Tag: v1.11.90~82^3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=befbd670945df2788dea64d5d2000349a4674e56;p=tigervnc.git Fake key release events for some Japanese keys Windows either completely omits WM_KEYUP for these, or only sends it just before the next WM_KEYDOWN for the key. --- diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx index 84777be1..b5466acb 100644 --- a/vncviewer/Viewport.cxx +++ b/vncviewer/Viewport.cxx @@ -1060,6 +1060,16 @@ int Viewport::handleSystemEvent(void *event, void *data) self->handleKeyPress(keyCode, keySym); + // We don't get reliable WM_KEYUP for these + switch (keySym) { + case XK_Zenkaku_Hankaku: + case XK_Eisu_toggle: + case XK_Katakana: + case XK_Hiragana: + case XK_Romaji: + self->handleKeyRelease(keyCode); + } + return 1; } else if ((msg->message == WM_KEYUP) || (msg->message == WM_SYSKEYUP)) { UINT vKey;