Win32: Fix right Shift scancode when using CJK IME

Fixes #2050

(cherry picked from commit 6dd526fb1a)
This commit is contained in:
Camilla Löwy 2022-06-28 22:26:39 +02:00
parent 935d7098b6
commit 0f341802e1
3 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,7 @@ video tutorials.
- Nevyn Bengtsson - Nevyn Bengtsson
- Niklas Bergström - Niklas Bergström
- Denis Bernard - Denis Bernard
- BiBi
- Doug Binks - Doug Binks
- blanco - blanco
- Waris Boonyasiriwat - Waris Boonyasiriwat

View File

@ -133,6 +133,7 @@ information on what to include when reporting a bug.
match event scancode (#1993) match event scancode (#1993)
- [Win32] Bugfix: Instance-local operations used executable instance (#469,#1296,#1395) - [Win32] Bugfix: Instance-local operations used executable instance (#469,#1296,#1395)
- [Win32] Bugfix: The OSMesa library was not unloaded on termination - [Win32] Bugfix: The OSMesa library was not unloaded on termination
- [Win32] Bugfix: Right shift emitted `GLFW_KEY_UNKNOWN` when using a CJK IME (#2050)
- [Cocoa] Disabled macOS fullscreen when `GLFW_RESIZABLE` is false - [Cocoa] Disabled macOS fullscreen when `GLFW_RESIZABLE` is false
- [Cocoa] Bugfix: A connected Apple AirPlay would emit a useless error (#1791) - [Cocoa] Bugfix: A connected Apple AirPlay would emit a useless error (#1791)
- [Cocoa] Bugfix: The EGL and OSMesa libraries were not unloaded on termination - [Cocoa] Bugfix: The EGL and OSMesa libraries were not unloaded on termination

View File

@ -756,6 +756,10 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
if (scancode == 0x146) if (scancode == 0x146)
scancode = 0x45; scancode = 0x45;
// HACK: CJK IME sets the extended bit for right Shift
if (scancode == 0x136)
scancode = 0x36;
key = _glfw.win32.keycodes[scancode]; key = _glfw.win32.keycodes[scancode];
// The Ctrl keys require special handling // The Ctrl keys require special handling