This commit is contained in:
Grzesiek11 2025-04-04 00:56:18 +00:00 committed by GitHub
commit ba615eee88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -133,6 +133,7 @@ information on what to include when reporting a bug.
- [Null] Added Vulkan 'window' surface creation via `VK_EXT_headless_surface` - [Null] Added Vulkan 'window' surface creation via `VK_EXT_headless_surface`
- [Null] Added EGL context creation on Mesa via `EGL_MESA_platform_surfaceless` - [Null] Added EGL context creation on Mesa via `EGL_MESA_platform_surfaceless`
- [EGL] Allowed native access on Wayland with `GLFW_CONTEXT_CREATION_API` set to - [EGL] Allowed native access on Wayland with `GLFW_CONTEXT_CREATION_API` set to
- [Win32] Bugfix: Extended scancode of 0 was not being processed correctly
`GLFW_NATIVE_CONTEXT_API` (#2518) `GLFW_NATIVE_CONTEXT_API` (#2518)

View File

@ -714,11 +714,11 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM l
const int mods = getKeyMods(); const int mods = getKeyMods();
scancode = (HIWORD(lParam) & (KF_EXTENDED | 0xff)); scancode = (HIWORD(lParam) & (KF_EXTENDED | 0xff));
if (!scancode) if (scancode == 0x100)
{ {
// NOTE: Some synthetic key messages have a scancode of zero // NOTE: Some synthetic key messages have a scancode of extended zero
// HACK: Map the virtual key back to a usable scancode // HACK: Map the virtual key back to a usable scancode
scancode = MapVirtualKeyW((UINT) wParam, MAPVK_VK_TO_VSC); scancode = KF_EXTENDED | MapVirtualKeyW((UINT) wParam, MAPVK_VK_TO_VSC);
} }
// HACK: Alt+PrtSc has a different scancode than just PrtSc // HACK: Alt+PrtSc has a different scancode than just PrtSc