mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Win32: Fix glfwGetKeyScancode for GLFW_KEY_PAUSE
The bug described in03cfe957e7
was already present for another key where modifiers changes its scancode. Related to #1993 (cherry picked from commit8d9231fe5e
)
This commit is contained in:
parent
32df2ed716
commit
c2ccf6f919
@ -125,6 +125,8 @@ information on what to include when reporting a bug.
|
||||
|
||||
- [Win32] Bugfix: `Alt+PrtSc` would emit `GLFW_KEY_UNKNOWN` and a different
|
||||
scancode than `PrtSc` (#1993)
|
||||
- [Win32] Bugfix: `GLFW_KEY_PAUSE` scancode from `glfwGetKeyScancode` did not
|
||||
match event scancode (#1993)
|
||||
|
||||
|
||||
## Contact
|
||||
|
@ -254,7 +254,6 @@ static void createKeyTables(void)
|
||||
_glfw.win32.keycodes[0x151] = GLFW_KEY_PAGE_DOWN;
|
||||
_glfw.win32.keycodes[0x149] = GLFW_KEY_PAGE_UP;
|
||||
_glfw.win32.keycodes[0x045] = GLFW_KEY_PAUSE;
|
||||
_glfw.win32.keycodes[0x146] = GLFW_KEY_PAUSE;
|
||||
_glfw.win32.keycodes[0x039] = GLFW_KEY_SPACE;
|
||||
_glfw.win32.keycodes[0x00F] = GLFW_KEY_TAB;
|
||||
_glfw.win32.keycodes[0x03A] = GLFW_KEY_CAPS_LOCK;
|
||||
|
@ -752,6 +752,10 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
||||
if (scancode == 0x54)
|
||||
scancode = 0x137;
|
||||
|
||||
// HACK: Ctrl+Pause has a different scancode than just Pause
|
||||
if (scancode == 0x146)
|
||||
scancode = 0x45;
|
||||
|
||||
key = _glfw.win32.keycodes[scancode];
|
||||
|
||||
// The Ctrl keys require special handling
|
||||
|
Loading…
Reference in New Issue
Block a user