From 3c1a83d61f5e2ea7e58ec8a71164895653ae3109 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 29 Nov 2015 16:55:08 +0000 Subject: [PATCH] Fix keys filtered by IME being passed to callback Closes #651. --- src/win32_window.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/win32_window.c b/src/win32_window.c index b5c03ea3..15295a95 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -329,6 +329,13 @@ static int translateKey(WPARAM wParam, LPARAM lParam) return GLFW_KEY_LEFT_CONTROL; } + if (wParam == VK_PROCESSKEY) + { + // IME notifies that keys have been filtered by setting the virtual + // key-code to VK_PROCESSKEY + return _GLFW_KEY_INVALID; + } + return _glfw.win32.publicKeys[HIWORD(lParam) & 0x1FF]; }