Commit 21d0cdedb32be941fae6bfe01155614e1d528bda

Ryan C. Gordon 2015-05-26T20:55:03

Added some unknown keys from Japanese 106/109 keyboards (thanks, "ver0hiro"!). This adds them for Windows and X11. Fixes Bugzilla #2820.

diff --git a/src/events/scancodes_windows.h b/src/events/scancodes_windows.h
index 655c8fa..f712d5a 100644
--- a/src/events/scancodes_windows.h
+++ b/src/events/scancodes_windows.h
@@ -49,7 +49,7 @@ static const SDL_Scancode windows_scancode_table[] =
 	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_F13,		SDL_SCANCODE_F14,			SDL_SCANCODE_F15,			SDL_SCANCODE_F16,		/* 6 */
 	SDL_SCANCODE_F17,			SDL_SCANCODE_F18,			SDL_SCANCODE_F19,			SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	/* 6 */
 	
-	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	/* 7 */
-	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN	/* 7 */
+	SDL_SCANCODE_INTERNATIONAL2,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_INTERNATIONAL1,		SDL_SCANCODE_UNKNOWN,	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN,	/* 7 */
+	SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_INTERNATIONAL4,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_INTERNATIONAL5,		SDL_SCANCODE_UNKNOWN,	SDL_SCANCODE_INTERNATIONAL3,		SDL_SCANCODE_UNKNOWN,		SDL_SCANCODE_UNKNOWN	/* 7 */
 };
 /* *INDENT-ON* */
diff --git a/src/events/scancodes_xfree86.h b/src/events/scancodes_xfree86.h
index c325bca..e615552 100644
--- a/src/events/scancodes_xfree86.h
+++ b/src/events/scancodes_xfree86.h
@@ -141,15 +141,15 @@ static const SDL_Scancode xfree86_scancode_table[] = {
     /*  112 */  SDL_SCANCODE_F15,
     /*  113 */  SDL_SCANCODE_F16,
     /*  114 */  SDL_SCANCODE_F17,
-    /*  115 */  SDL_SCANCODE_UNKNOWN,
+    /*  115 */  SDL_SCANCODE_INTERNATIONAL1, /* \_ */
     /*  116 */  SDL_SCANCODE_UNKNOWN, /* is translated to XK_ISO_Level3_Shift by my X server, but I have no keyboard that generates this code, so I don't know what the correct SDL_SCANCODE_* for it is */
     /*  117 */  SDL_SCANCODE_UNKNOWN,
     /*  118 */  SDL_SCANCODE_KP_EQUALS,
     /*  119 */  SDL_SCANCODE_UNKNOWN,
     /*  120 */  SDL_SCANCODE_UNKNOWN,
-    /*  121 */  SDL_SCANCODE_UNKNOWN,
+    /*  121 */  SDL_SCANCODE_INTERNATIONAL4, /* Henkan_Mode */
     /*  122 */  SDL_SCANCODE_UNKNOWN,
-    /*  123 */  SDL_SCANCODE_UNKNOWN,
+    /*  123 */  SDL_SCANCODE_INTERNATIONAL5, /* Muhenkan */
     /*  124 */  SDL_SCANCODE_UNKNOWN,
     /*  125 */  SDL_SCANCODE_INTERNATIONAL3, /* Yen */
     /*  126 */  SDL_SCANCODE_UNKNOWN,
@@ -266,12 +266,12 @@ static const SDL_Scancode xfree86_scancode_table2[] = {
     /*  86 */   SDL_SCANCODE_NONUSBACKSLASH,
     /*  87 */   SDL_SCANCODE_F11,
     /*  88 */   SDL_SCANCODE_F12,
-    /*  89 */   SDL_SCANCODE_SLASH,
+    /*  89 */   SDL_SCANCODE_INTERNATIONAL1, /* \_ */
     /*  90 */   SDL_SCANCODE_UNKNOWN,   /* Katakana */
     /*  91 */   SDL_SCANCODE_UNKNOWN,   /* Hiragana */
-    /*  92 */   SDL_SCANCODE_UNKNOWN,   /* Henkan_Mode */
-    /*  93 */   SDL_SCANCODE_UNKNOWN,   /* Hiragana_Katakana */
-    /*  94 */   SDL_SCANCODE_UNKNOWN,   /* Muhenkan */
+    /*  92 */   SDL_SCANCODE_INTERNATIONAL4, /* Henkan_Mode */
+    /*  93 */   SDL_SCANCODE_INTERNATIONAL2, /* Hiragana_Katakana */
+    /*  94 */   SDL_SCANCODE_INTERNATIONAL5, /* Muhenkan */
     /*  95 */   SDL_SCANCODE_UNKNOWN,
     /*  96 */   SDL_SCANCODE_KP_ENTER,
     /*  97 */   SDL_SCANCODE_RCTRL,
@@ -301,7 +301,7 @@ static const SDL_Scancode xfree86_scancode_table2[] = {
     /* 121 */   SDL_SCANCODE_UNKNOWN,   /* KP_Decimal */
     /* 122 */   SDL_SCANCODE_UNKNOWN,   /* Hangul */
     /* 123 */   SDL_SCANCODE_UNKNOWN,   /* Hangul_Hanja */
-    /* 124 */   SDL_SCANCODE_UNKNOWN,
+    /* 124 */   SDL_SCANCODE_INTERNATIONAL3, /* Yen */
     /* 125 */   SDL_SCANCODE_LGUI,
     /* 126 */   SDL_SCANCODE_RGUI,
     /* 127 */   SDL_SCANCODE_APPLICATION,