From 3fcbd12139be0e177dff413bce50f7633672b410 Mon Sep 17 00:00:00 2001
From: muzikbike <[EMAIL REDACTED]>
Date: Wed, 23 Sep 2026 17:59:00 +0100
Subject: [PATCH] More bindings and findings (#16238)
* Fix #16208 by remapping
I'm also skeptical of 102 and 104 being mapped to LANG 1 and 2, since on Windows and Linux those are mapped to Korean keys, not Japanese keys
I'm surprised that there's no SDL brightness key codes, even though there are volume control keycodes
* Microsoft IME Right Shift fix
Right Shift's scancode is extended when Microsoft IME is active, resulting in it not being correctly recognised (https://mojira.dev/MC-311424)
---
src/events/scancodes_darwin.h | 2 +-
src/events/scancodes_windows.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/events/scancodes_darwin.h b/src/events/scancodes_darwin.h
index 0ca4d55666ed7..6add7ee25082f 100644
--- a/src/events/scancodes_darwin.h
+++ b/src/events/scancodes_darwin.h
@@ -122,7 +122,7 @@ static const SDL_Scancode darwin_scancode_table[] = {
/* 92 */ SDL_SCANCODE_KP_9,
/* 93 */ SDL_SCANCODE_INTERNATIONAL3, // Cosmo_USB2ADB.c says "Yen (JIS)"
/* 94 */ SDL_SCANCODE_INTERNATIONAL1, // Cosmo_USB2ADB.c says "Ro (JIS)"
- /* 95 */ SDL_SCANCODE_KP_COMMA, // Cosmo_USB2ADB.c says ", JIS only"
+ /* 95 */ SDL_SCANCODE_INTERNATIONAL6, // Cosmo_USB2ADB.c says ", JIS only"
/* 96 */ SDL_SCANCODE_F5,
/* 97 */ SDL_SCANCODE_F6,
/* 98 */ SDL_SCANCODE_F7,
diff --git a/src/events/scancodes_windows.h b/src/events/scancodes_windows.h
index cbb893a7d94cd..93d4edaa1ae78 100644
--- a/src/events/scancodes_windows.h
+++ b/src/events/scancodes_windows.h
@@ -155,7 +155,7 @@ static const SDL_Scancode windows_scancode_table[] = {
/*0x7e*/ SDL_SCANCODE_KP_COMMA,
/*0x7f*/ SDL_SCANCODE_UNKNOWN,
/*0xe000*/ SDL_SCANCODE_UNKNOWN,
- /*0xe001*/ SDL_SCANCODE_UNKNOWN,
+ /*0xe001*/ SDL_SCANCODE_UNKNOWN, // Fn+Esc on HP 250 G7 Notebook PC and HP Laptop 14-cm0xxx keyboards
/*0xe002*/ SDL_SCANCODE_UNKNOWN,
/*0xe003*/ SDL_SCANCODE_UNKNOWN,
/*0xe004*/ SDL_SCANCODE_UNKNOWN,
@@ -197,7 +197,7 @@ static const SDL_Scancode windows_scancode_table[] = {
/*0xe028*/ SDL_SCANCODE_UNKNOWN,
/*0xe029*/ SDL_SCANCODE_UNKNOWN,
/*0xe02a*/ SDL_SCANCODE_UNKNOWN,
- /*0xe02b*/ SDL_SCANCODE_UNKNOWN,
+ /*0xe02b*/ SDL_SCANCODE_UNKNOWN, // Brightness up & brightness down on HP 250 G7 Notebook PC and HP Laptop 14-cm0xxx keyboards
/*0xe02c*/ SDL_SCANCODE_MEDIA_EJECT,
/*0xe02d*/ SDL_SCANCODE_UNKNOWN,
/*0xe02e*/ SDL_SCANCODE_VOLUMEDOWN,
@@ -208,7 +208,7 @@ static const SDL_Scancode windows_scancode_table[] = {
/*0xe033*/ SDL_SCANCODE_UNKNOWN,
/*0xe034*/ SDL_SCANCODE_UNKNOWN,
/*0xe035*/ SDL_SCANCODE_KP_DIVIDE,
- /*0xe036*/ SDL_SCANCODE_UNKNOWN,
+ /*0xe036*/ SDL_SCANCODE_RSHIFT, // see https://mojira.dev/MC-311424
/*0xe037*/ SDL_SCANCODE_PRINTSCREEN,
/*0xe038*/ SDL_SCANCODE_RALT,
/*0xe039*/ SDL_SCANCODE_UNKNOWN,