From 1900d9a656938b07d91be0d32e1325eeb7530216 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 30 Mar 2014 20:52:09 +0200 Subject: [PATCH] Included extended flag in Win32 scan code. --- src/win32_window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/win32_window.c b/src/win32_window.c index 2b04ac71..8788719d 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -516,7 +516,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, case WM_KEYDOWN: case WM_SYSKEYDOWN: { - const int scancode = (lParam >> 16) & 0xff; + const int scancode = (lParam >> 16) & 0x1ff; const int key = translateKey(wParam, lParam); if (key == _GLFW_KEY_INVALID) break; @@ -551,7 +551,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, case WM_SYSKEYUP: { const int mods = getKeyMods(); - const int scancode = (lParam >> 16) & 0xff; + const int scancode = (lParam >> 16) & 0x1ff; const int key = translateKey(wParam, lParam); if (key == _GLFW_KEY_INVALID) break;