| Summary: | Missing X11 scancode mappings for numeric keypad | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Michael Roe <mroe149227> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | NEW --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.8 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
The mapping from X11 scancodes to SDL scancodes in events/scancodes_xfree86.h is missing entries for the additional keys found on some numeric keypads, such as the Microsoft Natural 4000. The effect of this bug is that these keys won't work in SDL2 applications. Here's a patch to fix the issue. (The patch also fixes another bug, that the scancode for the Fast Forward key was wrong). *** scancodes_xfree86.h.old 2018-05-11 19:44:28.646047000 +0100 --- scancodes_xfree86.h 2018-05-11 19:45:08.830265000 +0100 *************** *** 298,304 **** /* 118 */ SDL_SCANCODE_UNKNOWN, /* plusminus */ /* 119 */ SDL_SCANCODE_PAUSE, /* 120 */ SDL_SCANCODE_UNKNOWN, /* XF86LaunchA */ ! /* 121 */ SDL_SCANCODE_UNKNOWN, /* KP_Decimal */ /* 122 */ SDL_SCANCODE_UNKNOWN, /* Hangul */ /* 123 */ SDL_SCANCODE_UNKNOWN, /* Hangul_Hanja */ /* 124 */ SDL_SCANCODE_INTERNATIONAL3, /* Yen */ --- 298,304 ---- /* 118 */ SDL_SCANCODE_UNKNOWN, /* plusminus */ /* 119 */ SDL_SCANCODE_PAUSE, /* 120 */ SDL_SCANCODE_UNKNOWN, /* XF86LaunchA */ ! /* 121 */ SDL_SCANCODE_KP_COMMA, /* KP_Decimal */ /* 122 */ SDL_SCANCODE_UNKNOWN, /* Hangul */ /* 123 */ SDL_SCANCODE_UNKNOWN, /* Hangul_Hanja */ /* 124 */ SDL_SCANCODE_INTERNATIONAL3, /* Yen */ *************** *** 356,363 **** /* 176 */ SDL_SCANCODE_UNKNOWN, /* 177 */ SDL_SCANCODE_UNKNOWN, /* XF86ScrollUp */ /* 178 */ SDL_SCANCODE_UNKNOWN, /* XF86ScrollDown */ ! /* 179 */ SDL_SCANCODE_UNKNOWN, /* parenleft */ ! /* 180 */ SDL_SCANCODE_UNKNOWN, /* parenright */ /* 181 */ SDL_SCANCODE_UNKNOWN, /* XF86New */ /* 182 */ SDL_SCANCODE_AGAIN, /* 183 */ SDL_SCANCODE_F13, /* XF86Tools */ --- 356,363 ---- /* 176 */ SDL_SCANCODE_UNKNOWN, /* 177 */ SDL_SCANCODE_UNKNOWN, /* XF86ScrollUp */ /* 178 */ SDL_SCANCODE_UNKNOWN, /* XF86ScrollDown */ ! /* 179 */ SDL_SCANCODE_KP_LEFTPAREN, /* parenleft */ ! /* 180 */ SDL_SCANCODE_KP_RIGHTPAREN, /* parenright */ /* 181 */ SDL_SCANCODE_UNKNOWN, /* XF86New */ /* 182 */ SDL_SCANCODE_AGAIN, /* 183 */ SDL_SCANCODE_F13, /* XF86Tools */ *************** *** 385,391 **** /* 205 */ SDL_SCANCODE_UNKNOWN, /* XF86Suspend */ /* 206 */ SDL_SCANCODE_UNKNOWN, /* XF86Close */ /* 207 */ SDL_SCANCODE_AUDIOPLAY, ! /* 208 */ SDL_SCANCODE_AUDIONEXT, /* 209 */ SDL_SCANCODE_UNKNOWN, /* 210 */ SDL_SCANCODE_PRINTSCREEN, /* 211 */ SDL_SCANCODE_UNKNOWN, --- 385,391 ---- /* 205 */ SDL_SCANCODE_UNKNOWN, /* XF86Suspend */ /* 206 */ SDL_SCANCODE_UNKNOWN, /* XF86Close */ /* 207 */ SDL_SCANCODE_AUDIOPLAY, ! /* 208 */ SDL_SCANCODE_AUDIOFASTFORWARD, /* 209 */ SDL_SCANCODE_UNKNOWN, /* 210 */ SDL_SCANCODE_PRINTSCREEN, /* 211 */ SDL_SCANCODE_UNKNOWN,