X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/b56ff5c3a7acd4e79ea1d48975838c17046aa86e..43e95114cbfc44a5d3a6f1adeff986cb5cd12f78:/windows/window.c diff --git a/windows/window.c b/windows/window.c index ac54adab..8448ca34 100644 --- a/windows/window.c +++ b/windows/window.c @@ -2734,13 +2734,15 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, unsigned char buf[20]; int len; - if (wParam == VK_PROCESSKEY) { - MSG m; - m.hwnd = hwnd; - m.message = WM_KEYDOWN; - m.wParam = wParam; - m.lParam = lParam & 0xdfff; - TranslateMessage(&m); + if (wParam == VK_PROCESSKEY) { /* IME PROCESS key */ + if (message == WM_KEYDOWN) { + MSG m; + m.hwnd = hwnd; + m.message = WM_KEYDOWN; + m.wParam = wParam; + m.lParam = lParam & 0xdfff; + TranslateMessage(&m); + } else break; /* pass to Windows for default processing */ } else { len = TranslateKey(message, wParam, lParam, buf); if (len == -1)