Fixed bug 4814 - Missing scancodes on Linux
authorSam Lantinga <slouken@libsdl.org>
Sat, 16 Nov 2019 22:45:49 -0800
changeset 13252900d20d46990
parent 13251 6e17e1a6cf2e
child 13254 3656eb60941b
Fixed bug 4814 - Missing scancodes on Linux

Michael Roe

The mappings for keyboard scancodes on Linux do not include keypad left and right parentheses (used on some Microsoft keyboard), keypad plus/minus, LANG1 and LANG2 (used on Korean keyboards), XK86MenuKB, and F20 (remapped to Audio Mic Mute in the usual X11 config).
src/events/scancodes_xfree86.h
     1.1 --- a/src/events/scancodes_xfree86.h	Sat Nov 16 22:35:48 2019 -0800
     1.2 +++ b/src/events/scancodes_xfree86.h	Sat Nov 16 22:45:49 2019 -0800
     1.3 @@ -299,12 +299,12 @@
     1.4      /* 115 */   SDL_SCANCODE_VOLUMEUP,
     1.5      /* 116 */   SDL_SCANCODE_POWER,
     1.6      /* 117 */   SDL_SCANCODE_KP_EQUALS,
     1.7 -    /* 118 */   SDL_SCANCODE_UNKNOWN,   /* plusminus */
     1.8 +    /* 118 */   SDL_SCANCODE_KP_PLUSMINUS, /* plusminus */
     1.9      /* 119 */   SDL_SCANCODE_PAUSE,
    1.10      /* 120 */   SDL_SCANCODE_UNKNOWN,   /* XF86LaunchA */
    1.11 -    /* 121 */   SDL_SCANCODE_UNKNOWN,   /* KP_Decimal */
    1.12 -    /* 122 */   SDL_SCANCODE_UNKNOWN,   /* Hangul */
    1.13 -    /* 123 */   SDL_SCANCODE_UNKNOWN,   /* Hangul_Hanja */
    1.14 +    /* 121 */   SDL_SCANCODE_KP_COMMA,  /* KP_Decimal */
    1.15 +    /* 122 */   SDL_SCANCODE_LANG1,     /* Hangul */
    1.16 +    /* 123 */   SDL_SCANCODE_LANG2,     /* Hangul_Hanja */
    1.17      /* 124 */   SDL_SCANCODE_INTERNATIONAL3, /* Yen */
    1.18      /* 125 */   SDL_SCANCODE_LGUI,
    1.19      /* 126 */   SDL_SCANCODE_RGUI,
    1.20 @@ -320,7 +320,7 @@
    1.21      /* 136 */   SDL_SCANCODE_FIND,
    1.22      /* 137 */   SDL_SCANCODE_CUT,
    1.23      /* 138 */   SDL_SCANCODE_HELP,
    1.24 -    /* 139 */   SDL_SCANCODE_UNKNOWN,   /* XF86MenuKB */
    1.25 +    /* 139 */   SDL_SCANCODE_MENU,   /* XF86MenuKB */
    1.26      /* 140 */   SDL_SCANCODE_CALCULATOR,
    1.27      /* 141 */   SDL_SCANCODE_UNKNOWN,
    1.28      /* 142 */   SDL_SCANCODE_SLEEP,
    1.29 @@ -360,8 +360,8 @@
    1.30      /* 176 */   SDL_SCANCODE_UNKNOWN,
    1.31      /* 177 */   SDL_SCANCODE_UNKNOWN,   /* XF86ScrollUp */
    1.32      /* 178 */   SDL_SCANCODE_UNKNOWN,   /* XF86ScrollDown */
    1.33 -    /* 179 */   SDL_SCANCODE_UNKNOWN,   /* parenleft */
    1.34 -    /* 180 */   SDL_SCANCODE_UNKNOWN,   /* parenright */
    1.35 +    /* 179 */   SDL_SCANCODE_KP_LEFTPAREN,  /* parenleft */
    1.36 +    /* 180 */   SDL_SCANCODE_KP_RIGHTPAREN, /* parenright */
    1.37      /* 181 */   SDL_SCANCODE_UNKNOWN,   /* XF86New */
    1.38      /* 182 */   SDL_SCANCODE_AGAIN,
    1.39      /* 183 */   SDL_SCANCODE_F13,       /* XF86Tools */
    1.40 @@ -371,7 +371,7 @@
    1.41      /* 187 */   SDL_SCANCODE_F17,       /* XF86Launch8 */
    1.42      /* 188 */   SDL_SCANCODE_F18,       /* XF86Launch9 */
    1.43      /* 189 */   SDL_SCANCODE_F19,       /* null keysym */
    1.44 -    /* 190 */   SDL_SCANCODE_UNKNOWN,
    1.45 +    /* 190 */   SDL_SCANCODE_F20,
    1.46      /* 191 */   SDL_SCANCODE_UNKNOWN,
    1.47      /* 192 */   SDL_SCANCODE_UNKNOWN,   /* XF86TouchpadToggle */
    1.48      /* 193 */   SDL_SCANCODE_UNKNOWN,
    1.49 @@ -389,7 +389,7 @@
    1.50      /* 205 */   SDL_SCANCODE_UNKNOWN,   /* XF86Suspend */
    1.51      /* 206 */   SDL_SCANCODE_UNKNOWN,   /* XF86Close */
    1.52      /* 207 */   SDL_SCANCODE_AUDIOPLAY,
    1.53 -    /* 208 */   SDL_SCANCODE_AUDIONEXT,
    1.54 +    /* 208 */   SDL_SCANCODE_AUDIOFASTFORWARD,
    1.55      /* 209 */   SDL_SCANCODE_UNKNOWN,
    1.56      /* 210 */   SDL_SCANCODE_PRINTSCREEN,
    1.57      /* 211 */   SDL_SCANCODE_UNKNOWN,