Updated SDL3 scancode list

This adds more app editing and audio control keys and removes keys that launch applications

Work in progress on https://github.com/libsdl-org/SDL/issues/6390
This commit is contained in:
Sam Lantinga 2024-06-18 07:22:39 -07:00
parent 00ab4a8eba
commit 9d816c72ef
12 changed files with 412 additions and 242 deletions

View File

@ -3312,3 +3312,75 @@ typedef SDL_Colour, SDL_Color;
- SDL_SwapBE64
+ SDL_Swap64BE
(...)
@@
@@
- SDL_SCANCODE_AUDIOMUTE
+ SDL_SCANCODE_MUTE
@@
@@
- SDLK_AUDIOMUTE
+ SDLK_MUTE
@@
@@
- SDL_SCANCODE_EJECT
+ SDL_SCANCODE_MEDIA_EJECT
@@
@@
- SDLK_EJECT
+ SDLK_MEDIA_EJECT
@@
@@
- SDL_SCANCODE_AUDIONEXT
+ SDL_SCANCODE_MEDIA_NEXT_TRACK
@@
@@
- SDLK_AUDIONEXT
+ SDLK_MEDIA_NEXT_TRACK
@@
@@
- SDL_SCANCODE_AUDIOPREV
+ SDL_SCANCODE_MEDIA_PREVIOUS_TRACK
@@
@@
- SDLK_AUDIOPREV
+ SDLK_MEDIA_PREVIOUS_TRACK
@@
@@
- SDL_SCANCODE_AUDIOSTOP
+ SDL_SCANCODE_MEDIA_STOP
@@
@@
- SDLK_AUDIOSTOP
+ SDLK_MEDIA_STOP
@@
@@
- SDL_SCANCODE_AUDIOPLAY
+ SDL_SCANCODE_MEDIA_PLAY
@@
@@
- SDLK_AUDIOPLAY
+ SDLK_MEDIA_PLAY
@@
@@
- SDL_SCANCODE_AUDIOREWIND
+ SDL_SCANCODE_MEDIA_REWIND
@@
@@
- SDLK_AUDIOREWIND
+ SDLK_MEDIA_REWIND
@@
@@
- SDL_SCANCODE_AUDIOFASTFORWARD
+ SDL_SCANCODE_MEDIA_FAST_FORWARD
@@
@@
- SDLK_AUDIOFASTFORWARD
+ SDLK_MEDIA_FAST_FORWARD
@@
@@
- SDL_SCANCODE_MEDIASELECT
+ SDL_SCANCODE_MEDIA_SELECT
@@
@@
- SDLK_MEDIASELECT
+ SDLK_MEDIA_SELECT

View File

@ -904,6 +904,19 @@ SDL_Keycode is now Uint32 and the SDLK_* constants are now defines instead of an
The following symbols have been removed:
* KMOD_RESERVED - No replacement. A bit named "RESERVED" probably shouldn't be used in an app, but if you need it, this was equivalent to KMOD_SCROLL (0x8000) in SDL2.
* SDLK_WWW
* SDLK_MAIL
* SDLK_CALCULATOR
* SDLK_COMPUTER
* SDLK_BRIGHTNESSDOWN
* SDLK_BRIGHTNESSUP
* SDLK_DISPLAYSWITCH
* SDLK_KBDILLUMTOGGLE
* SDLK_KBDILLUMDOWN
* SDLK_KBDILLUMUP
* SDLK_APP1
* SDLK_APP2
The following symbols have been renamed:
* KMOD_ALT => SDL_KMOD_ALT
@ -923,7 +936,16 @@ The following symbols have been renamed:
* KMOD_RSHIFT => SDL_KMOD_RSHIFT
* KMOD_SCROLL => SDL_KMOD_SCROLL
* KMOD_SHIFT => SDL_KMOD_SHIFT
* SDLK_AUDIOFASTFORWARD => SDLK_MEDIA_FAST_FORWARD
* SDLK_AUDIOMUTE => SDLK_MUTE
* SDLK_AUDIONEXT => SDLK_MEDIA_NEXT_TRACK
* SDLK_AUDIOPLAY => SDLK_MEDIA_PLAY
* SDLK_AUDIOPREV => SDLK_MEDIA_PREVIOUS_TRACK
* SDLK_AUDIOREWIND => SDLK_MEDIA_REWIND
* SDLK_AUDIOSTOP => SDLK_MEDIA_STOP
* SDLK_BACKQUOTE => SDLK_GRAVE
* SDLK_EJECT => SDLK_MEDIA_EJECT
* SDLK_MEDIASELECT => SDLK_MEDIA_SELECT
* SDLK_QUOTE => SDLK_APOSTROPHE
* SDLK_QUOTEDBL => SDLK_DBLAPOSTROPHE
@ -1415,6 +1437,33 @@ The following functions have been renamed:
The following structures have been renamed:
* SDL_RWops => SDL_IOStream
## SDL_scancode.h
The following symbols have been removed:
* SDL_SCANCODE_WWW
* SDL_SCANCODE_MAIL
* SDL_SCANCODE_CALCULATOR
* SDL_SCANCODE_COMPUTER
* SDL_SCANCODE_BRIGHTNESSDOWN
* SDL_SCANCODE_BRIGHTNESSUP
* SDL_SCANCODE_DISPLAYSWITCH
* SDL_SCANCODE_KBDILLUMTOGGLE
* SDL_SCANCODE_KBDILLUMDOWN
* SDL_SCANCODE_KBDILLUMUP
* SDL_SCANCODE_APP1
* SDL_SCANCODE_APP2
The following symbols have been renamed:
* SDL_SCANCODE_AUDIOFASTFORWARD => SDL_SCANCODE_MEDIA_FAST_FORWARD
* SDL_SCANCODE_AUDIOMUTE => SDL_SCANCODE_MUTE
* SDL_SCANCODE_AUDIONEXT => SDL_SCANCODE_MEDIA_NEXT_TRACK
* SDL_SCANCODE_AUDIOPLAY => SDL_SCANCODE_MEDIA_PLAY
* SDL_SCANCODE_AUDIOPREV => SDL_SCANCODE_MEDIA_PREVIOUS_TRACK
* SDL_SCANCODE_AUDIOREWIND => SDL_SCANCODE_MEDIA_REWIND
* SDL_SCANCODE_AUDIOSTOP => SDL_SCANCODE_MEDIA_STOP
* SDL_SCANCODE_EJECT => SDL_SCANCODE_MEDIA_EJECT
* SDL_SCANCODE_MEDIASELECT => SDL_SCANCODE_MEDIA_SELECT
## SDL_sensor.h
SDL_SensorID has changed from Sint32 to Uint32, with an invalid ID being 0.

View File

@ -261,16 +261,28 @@ typedef Uint32 SDL_Keycode;
#define SDLK_RALT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RALT)
#define SDLK_RGUI SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_RGUI)
#define SDLK_MODE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MODE)
#define SDLK_AUDIONEXT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIONEXT)
#define SDLK_AUDIOPREV SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPREV)
#define SDLK_AUDIOSTOP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOSTOP)
#define SDLK_AUDIOPLAY SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOPLAY)
#define SDLK_AUDIOMUTE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOMUTE)
#define SDLK_MEDIASELECT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIASELECT)
#define SDLK_WWW SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WWW)
#define SDLK_MAIL SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MAIL)
#define SDLK_CALCULATOR SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALCULATOR)
#define SDLK_COMPUTER SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_COMPUTER)
#define SDLK_SLEEP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP)
#define SDLK_WAKE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_WAKE)
#define SDLK_CHANNEL_INCREMENT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CHANNEL_INCREMENT)
#define SDLK_CHANNEL_DECREMENT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CHANNEL_DECREMENT)
#define SDLK_MEDIA_PLAY SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PLAY)
#define SDLK_MEDIA_PAUSE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PAUSE)
#define SDLK_MEDIA_RECORD SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_RECORD)
#define SDLK_MEDIA_FAST_FORWARD SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_FAST_FORWARD)
#define SDLK_MEDIA_REWIND SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_REWIND)
#define SDLK_MEDIA_NEXT_TRACK SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_NEXT_TRACK)
#define SDLK_MEDIA_PREVIOUS_TRACK SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PREVIOUS_TRACK)
#define SDLK_MEDIA_STOP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_STOP)
#define SDLK_MEDIA_EJECT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_EJECT)
#define SDLK_MEDIA_PLAY_PAUSE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_PLAY_PAUSE)
#define SDLK_MEDIA_SELECT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_MEDIA_SELECT)
#define SDLK_AC_NEW SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_NEW)
#define SDLK_AC_OPEN SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_OPEN)
#define SDLK_AC_CLOSE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_CLOSE)
#define SDLK_AC_EXIT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_EXIT)
#define SDLK_AC_SAVE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SAVE)
#define SDLK_AC_PRINT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_PRINT)
#define SDLK_AC_PROPERTIES SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_PROPERTIES)
#define SDLK_AC_SEARCH SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_SEARCH)
#define SDLK_AC_HOME SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_HOME)
#define SDLK_AC_BACK SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BACK)
@ -278,18 +290,6 @@ typedef Uint32 SDL_Keycode;
#define SDLK_AC_STOP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_STOP)
#define SDLK_AC_REFRESH SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_REFRESH)
#define SDLK_AC_BOOKMARKS SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AC_BOOKMARKS)
#define SDLK_BRIGHTNESSDOWN SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSDOWN)
#define SDLK_BRIGHTNESSUP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_BRIGHTNESSUP)
#define SDLK_DISPLAYSWITCH SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_DISPLAYSWITCH)
#define SDLK_KBDILLUMTOGGLE SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMTOGGLE)
#define SDLK_KBDILLUMDOWN SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN)
#define SDLK_KBDILLUMUP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP)
#define SDLK_EJECT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT)
#define SDLK_SLEEP SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP)
#define SDLK_APP1 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP1)
#define SDLK_APP2 SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2)
#define SDLK_AUDIOREWIND SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND)
#define SDLK_AUDIOFASTFORWARD SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
#define SDLK_SOFTLEFT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTLEFT)
#define SDLK_SOFTRIGHT SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT)
#define SDLK_CALL SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALL)

View File

@ -366,7 +366,16 @@
#define KMOD_RSHIFT SDL_KMOD_RSHIFT
#define KMOD_SCROLL SDL_KMOD_SCROLL
#define KMOD_SHIFT SDL_KMOD_SHIFT
#define SDLK_AUDIOFASTFORWARD SDLK_MEDIA_FAST_FORWARD
#define SDLK_AUDIOMUTE SDLK_MUTE
#define SDLK_AUDIONEXT SDLK_MEDIA_NEXT_TRACK
#define SDLK_AUDIOPLAY SDLK_MEDIA_PLAY
#define SDLK_AUDIOPREV SDLK_MEDIA_PREVIOUS_TRACK
#define SDLK_AUDIOREWIND SDLK_MEDIA_REWIND
#define SDLK_AUDIOSTOP SDLK_MEDIA_STOP
#define SDLK_BACKQUOTE SDLK_GRAVE
#define SDLK_EJECT SDLK_MEDIA_EJECT
#define SDLK_MEDIASELECT SDLK_MEDIA_SELECT
#define SDLK_QUOTE SDLK_APOSTROPHE
#define SDLK_QUOTEDBL SDLK_DBLAPOSTROPHE
@ -517,6 +526,17 @@
#define SDL_WriteLE32 SDL_WriteU32LE
#define SDL_WriteLE64 SDL_WriteU64LE
/* ##SDL_scancode.h */
#define SDL_SCANCODE_AUDIOFASTFORWARD SDL_SCANCODE_MEDIA_FAST_FORWARD
#define SDL_SCANCODE_AUDIOMUTE SDL_SCANCODE_MUTE
#define SDL_SCANCODE_AUDIONEXT SDL_SCANCODE_MEDIA_NEXT_TRACK
#define SDL_SCANCODE_AUDIOPLAY SDL_SCANCODE_MEDIA_PLAY
#define SDL_SCANCODE_AUDIOPREV SDL_SCANCODE_MEDIA_PREVIOUS_TRACK
#define SDL_SCANCODE_AUDIOREWIND SDL_SCANCODE_MEDIA_REWIND
#define SDL_SCANCODE_AUDIOSTOP SDL_SCANCODE_MEDIA_STOP
#define SDL_SCANCODE_EJECT SDL_SCANCODE_MEDIA_EJECT
#define SDL_SCANCODE_MEDIASELECT SDL_SCANCODE_MEDIA_SELECT
/* ##SDL_sensor.h */
#define SDL_SensorClose SDL_CloseSensor
#define SDL_SensorFromInstanceID SDL_GetSensorFromInstanceID
@ -915,7 +935,16 @@
#define KMOD_RSHIFT KMOD_RSHIFT_renamed_SDL_KMOD_RSHIFT
#define KMOD_SCROLL KMOD_SCROLL_renamed_SDL_KMOD_SCROLL
#define KMOD_SHIFT KMOD_SHIFT_renamed_SDL_KMOD_SHIFT
#define SDLK_AUDIOFASTFORWARD SDLK_AUDIOFASTFORWARD_renamed_SDLK_MEDIA_FAST_FORWARD
#define SDLK_AUDIOMUTE SDLK_AUDIOMUTE_renamed_SDLK_MUTE
#define SDLK_AUDIONEXT SDLK_AUDIONEXT_renamed_SDLK_MEDIA_NEXT_TRACK
#define SDLK_AUDIOPLAY SDLK_AUDIOPLAY_renamed_SDLK_MEDIA_PLAY
#define SDLK_AUDIOPREV SDLK_AUDIOPREV_renamed_SDLK_MEDIA_PREVIOUS_TRACK
#define SDLK_AUDIOREWIND SDLK_AUDIOREWIND_renamed_SDLK_MEDIA_REWIND
#define SDLK_AUDIOSTOP SDLK_AUDIOSTOP_renamed_SDLK_MEDIA_STOP
#define SDLK_BACKQUOTE SDLK_BACKQUOTE_renamed_SDLK_GRAVE
#define SDLK_EJECT SDLK_EJECT_renamed_SDLK_MEDIA_EJECT
#define SDLK_MEDIASELECT SDLK_MEDIASELECT_renamed_SDLK_MEDIA_SELECT
#define SDLK_QUOTE SDLK_QUOTE_renamed_SDLK_APOSTROPHE
#define SDLK_QUOTEDBL SDLK_QUOTEDBL_renamed_SDLK_DBLAPOSTROPHE
@ -1066,6 +1095,17 @@
#define SDL_WriteLE32 SDL_WriteLE32_renamed_SDL_WriteU32LE
#define SDL_WriteLE64 SDL_WriteLE64_renamed_SDL_WriteU64LE
/* ##SDL_scancode.h */
#define SDL_SCANCODE_AUDIOFASTFORWARD SDL_SCANCODE_AUDIOFASTFORWARD_renamed_SDL_SCANCODE_MEDIA_FAST_FORWARD
#define SDL_SCANCODE_AUDIOMUTE SDL_SCANCODE_AUDIOMUTE_renamed_SDL_SCANCODE_MUTE
#define SDL_SCANCODE_AUDIONEXT SDL_SCANCODE_AUDIONEXT_renamed_SDL_SCANCODE_MEDIA_NEXT_TRACK
#define SDL_SCANCODE_AUDIOPLAY SDL_SCANCODE_AUDIOPLAY_renamed_SDL_SCANCODE_MEDIA_PLAY
#define SDL_SCANCODE_AUDIOPREV SDL_SCANCODE_AUDIOPREV_renamed_SDL_SCANCODE_MEDIA_PREVIOUS_TRACK
#define SDL_SCANCODE_AUDIOREWIND SDL_SCANCODE_AUDIOREWIND_renamed_SDL_SCANCODE_MEDIA_REWIND
#define SDL_SCANCODE_AUDIOSTOP SDL_SCANCODE_AUDIOSTOP_renamed_SDL_SCANCODE_MEDIA_STOP
#define SDL_SCANCODE_EJECT SDL_SCANCODE_EJECT_renamed_SDL_SCANCODE_MEDIA_EJECT
#define SDL_SCANCODE_MEDIASELECT SDL_SCANCODE_MEDIASELECT_renamed_SDL_SCANCODE_MEDIA_SELECT
/* ##SDL_sensor.h */
#define SDL_SensorClose SDL_SensorClose_renamed_SDL_CloseSensor
#define SDL_SensorFromInstanceID SDL_SensorFromInstanceID_renamed_SDL_GetSensorFromInstanceID

View File

@ -356,59 +356,42 @@ typedef enum SDL_Scancode
*/
/* @{ */
SDL_SCANCODE_AUDIONEXT = 258,
SDL_SCANCODE_AUDIOPREV = 259,
SDL_SCANCODE_AUDIOSTOP = 260,
SDL_SCANCODE_AUDIOPLAY = 261,
SDL_SCANCODE_AUDIOMUTE = 262,
SDL_SCANCODE_MEDIASELECT = 263,
SDL_SCANCODE_WWW = 264, /**< AL Internet Browser */
SDL_SCANCODE_MAIL = 265,
SDL_SCANCODE_CALCULATOR = 266, /**< AL Calculator */
SDL_SCANCODE_COMPUTER = 267,
SDL_SCANCODE_AC_SEARCH = 268, /**< AC Search */
SDL_SCANCODE_AC_HOME = 269, /**< AC Home */
SDL_SCANCODE_AC_BACK = 270, /**< AC Back */
SDL_SCANCODE_AC_FORWARD = 271, /**< AC Forward */
SDL_SCANCODE_AC_STOP = 272, /**< AC Stop */
SDL_SCANCODE_AC_REFRESH = 273, /**< AC Refresh */
SDL_SCANCODE_AC_BOOKMARKS = 274, /**< AC Bookmarks */
SDL_SCANCODE_SLEEP = 258, /**< Sleep */
SDL_SCANCODE_WAKE = 259, /**< Wake */
SDL_SCANCODE_CHANNEL_INCREMENT = 260, /**< Channel Increment */
SDL_SCANCODE_CHANNEL_DECREMENT = 261, /**< Channel Decrement */
SDL_SCANCODE_MEDIA_PLAY = 262, /**< Play */
SDL_SCANCODE_MEDIA_PAUSE = 263, /**< Pause */
SDL_SCANCODE_MEDIA_RECORD = 264, /**< Record */
SDL_SCANCODE_MEDIA_FAST_FORWARD = 265, /**< Fast Forward */
SDL_SCANCODE_MEDIA_REWIND = 266, /**< Rewind */
SDL_SCANCODE_MEDIA_NEXT_TRACK = 267, /**< Next Track */
SDL_SCANCODE_MEDIA_PREVIOUS_TRACK = 268, /**< Previous Track */
SDL_SCANCODE_MEDIA_STOP = 269, /**< Stop */
SDL_SCANCODE_MEDIA_EJECT = 270, /**< Eject */
SDL_SCANCODE_MEDIA_PLAY_PAUSE = 271, /**< Play / Pause */
SDL_SCANCODE_MEDIA_SELECT = 272, /* Media Select */
SDL_SCANCODE_AC_NEW = 273, /**< AC New */
SDL_SCANCODE_AC_OPEN = 274, /**< AC Open */
SDL_SCANCODE_AC_CLOSE = 275, /**< AC Close */
SDL_SCANCODE_AC_EXIT = 276, /**< AC Exit */
SDL_SCANCODE_AC_SAVE = 277, /**< AC Save */
SDL_SCANCODE_AC_PRINT = 278, /**< AC Print */
SDL_SCANCODE_AC_PROPERTIES = 279, /**< AC Properties */
SDL_SCANCODE_AC_SEARCH = 280, /**< AC Search */
SDL_SCANCODE_AC_HOME = 281, /**< AC Home */
SDL_SCANCODE_AC_BACK = 282, /**< AC Back */
SDL_SCANCODE_AC_FORWARD = 283, /**< AC Forward */
SDL_SCANCODE_AC_STOP = 284, /**< AC Stop */
SDL_SCANCODE_AC_REFRESH = 285, /**< AC Refresh */
SDL_SCANCODE_AC_BOOKMARKS = 286, /**< AC Bookmarks */
/* @} *//* Usage page 0x0C */
/**
* \name Walther keys
*
* These are values that Christian Walther added (for mac keyboard?).
*/
/* @{ */
SDL_SCANCODE_BRIGHTNESSDOWN = 275,
SDL_SCANCODE_BRIGHTNESSUP = 276,
SDL_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display
switch, video mode switch */
SDL_SCANCODE_KBDILLUMTOGGLE = 278,
SDL_SCANCODE_KBDILLUMDOWN = 279,
SDL_SCANCODE_KBDILLUMUP = 280,
SDL_SCANCODE_EJECT = 281,
SDL_SCANCODE_SLEEP = 282, /**< SC System Sleep */
SDL_SCANCODE_APP1 = 283,
SDL_SCANCODE_APP2 = 284,
/* @} *//* Walther keys */
/**
* \name Usage page 0x0C (additional media keys)
*
* These values are mapped from usage page 0x0C (USB consumer page).
*/
/* @{ */
SDL_SCANCODE_AUDIOREWIND = 285,
SDL_SCANCODE_AUDIOFASTFORWARD = 286,
/* @} *//* Usage page 0x0C (additional media keys) */
/**
* \name Mobile keys

View File

@ -321,35 +321,35 @@ static const SDL_Keycode SDL_default_keymap[SDL_NUM_SCANCODES] = {
/* 255 */ SDLK_UNKNOWN,
/* 256 */ SDLK_UNKNOWN,
/* 257 */ SDLK_MODE,
/* 258 */ SDLK_AUDIONEXT,
/* 259 */ SDLK_AUDIOPREV,
/* 260 */ SDLK_AUDIOSTOP,
/* 261 */ SDLK_AUDIOPLAY,
/* 262 */ SDLK_AUDIOMUTE,
/* 263 */ SDLK_MEDIASELECT,
/* 264 */ SDLK_WWW,
/* 265 */ SDLK_MAIL,
/* 266 */ SDLK_CALCULATOR,
/* 267 */ SDLK_COMPUTER,
/* 268 */ SDLK_AC_SEARCH,
/* 269 */ SDLK_AC_HOME,
/* 270 */ SDLK_AC_BACK,
/* 271 */ SDLK_AC_FORWARD,
/* 272 */ SDLK_AC_STOP,
/* 273 */ SDLK_AC_REFRESH,
/* 274 */ SDLK_AC_BOOKMARKS,
/* 275 */ SDLK_BRIGHTNESSDOWN,
/* 276 */ SDLK_BRIGHTNESSUP,
/* 277 */ SDLK_DISPLAYSWITCH,
/* 278 */ SDLK_KBDILLUMTOGGLE,
/* 279 */ SDLK_KBDILLUMDOWN,
/* 280 */ SDLK_KBDILLUMUP,
/* 281 */ SDLK_EJECT,
/* 282 */ SDLK_SLEEP,
/* 283 */ SDLK_APP1,
/* 284 */ SDLK_APP2,
/* 285 */ SDLK_AUDIOREWIND,
/* 286 */ SDLK_AUDIOFASTFORWARD,
/* 258 */ SDLK_SLEEP,
/* 258 */ SDLK_WAKE,
/* 260 */ SDLK_CHANNEL_INCREMENT,
/* 261 */ SDLK_CHANNEL_DECREMENT,
/* 262 */ SDLK_MEDIA_PLAY,
/* 263 */ SDLK_MEDIA_PAUSE,
/* 264 */ SDLK_MEDIA_RECORD,
/* 265 */ SDLK_MEDIA_FAST_FORWARD,
/* 266 */ SDLK_MEDIA_REWIND,
/* 267 */ SDLK_MEDIA_NEXT_TRACK,
/* 268 */ SDLK_MEDIA_PREVIOUS_TRACK,
/* 269 */ SDLK_MEDIA_STOP,
/* 270 */ SDLK_MEDIA_EJECT,
/* 271 */ SDLK_MEDIA_PLAY_PAUSE,
/* 272 */ SDLK_MEDIA_SELECT,
/* 273 */ SDLK_AC_NEW,
/* 274 */ SDLK_AC_OPEN,
/* 275 */ SDLK_AC_CLOSE,
/* 276 */ SDLK_AC_EXIT,
/* 277 */ SDLK_AC_SAVE,
/* 278 */ SDLK_AC_PRINT,
/* 279 */ SDLK_AC_PROPERTIES,
/* 280 */ SDLK_AC_SEARCH,
/* 281 */ SDLK_AC_HOME,
/* 282 */ SDLK_AC_BACK,
/* 283 */ SDLK_AC_FORWARD,
/* 284 */ SDLK_AC_STOP,
/* 285 */ SDLK_AC_REFRESH,
/* 286 */ SDLK_AC_BOOKMARKS,
/* 287 */ SDLK_SOFTLEFT,
/* 288 */ SDLK_SOFTRIGHT,
/* 289 */ SDLK_CALL,
@ -615,35 +615,35 @@ static const char *SDL_scancode_names[SDL_NUM_SCANCODES] = {
/* 255 */ NULL,
/* 256 */ NULL,
/* 257 */ "ModeSwitch",
/* 258 */ "AudioNext",
/* 259 */ "AudioPrev",
/* 260 */ "AudioStop",
/* 261 */ "AudioPlay",
/* 262 */ "AudioMute",
/* 263 */ "MediaSelect",
/* 264 */ "WWW",
/* 265 */ "Mail",
/* 266 */ "Calculator",
/* 267 */ "Computer",
/* 268 */ "AC Search",
/* 269 */ "AC Home",
/* 270 */ "AC Back",
/* 271 */ "AC Forward",
/* 272 */ "AC Stop",
/* 273 */ "AC Refresh",
/* 274 */ "AC Bookmarks",
/* 275 */ "BrightnessDown",
/* 276 */ "BrightnessUp",
/* 277 */ "DisplaySwitch",
/* 278 */ "KBDIllumToggle",
/* 279 */ "KBDIllumDown",
/* 280 */ "KBDIllumUp",
/* 281 */ "Eject",
/* 282 */ "Sleep",
/* 283 */ "App1",
/* 284 */ "App2",
/* 285 */ "AudioRewind",
/* 286 */ "AudioFastForward",
/* 258 */ "Sleep",
/* 259 */ "Wake",
/* 260 */ "ChannelUp",
/* 261 */ "ChannelDown",
/* 262 */ "MediaPlay",
/* 263 */ "MediaPause",
/* 264 */ "MediaRecord",
/* 265 */ "MediaFastForward",
/* 266 */ "MediaRewind",
/* 267 */ "MediaTrackNext",
/* 268 */ "MediaTrackPrevious",
/* 269 */ "MediaStop",
/* 270 */ "Eject",
/* 271 */ "MediaPlayPause",
/* 272 */ "MediaSelect",
/* 273 */ "AC New",
/* 274 */ "AC Open",
/* 275 */ "AC Close",
/* 276 */ "AC Exit",
/* 277 */ "AC Save",
/* 278 */ "AC Print",
/* 279 */ "AC Properties",
/* 280 */ "AC Search",
/* 281 */ "AC Home",
/* 282 */ "AC Back",
/* 283 */ "AC Forward",
/* 284 */ "AC Stop",
/* 285 */ "AC Refresh",
/* 286 */ "AC Bookmarks",
/* 287 */ "SoftLeft",
/* 288 */ "SoftRight",
/* 289 */ "Call",

View File

@ -156,17 +156,17 @@ static SDL_Scancode const linux_scancode_table[] = {
/* 127, 0x07f */ SDL_SCANCODE_APPLICATION, /* KEY_COMPOSE */
/* 128, 0x080 */ SDL_SCANCODE_STOP, /* KEY_STOP */
/* 129, 0x081 */ SDL_SCANCODE_AGAIN, /* KEY_AGAIN */
/* 130, 0x082 */ SDL_SCANCODE_UNKNOWN, /* KEY_PROPS */
/* 130, 0x082 */ SDL_SCANCODE_AC_PROPERTIES, /* KEY_PROPS */
/* 131, 0x083 */ SDL_SCANCODE_UNDO, /* KEY_UNDO */
/* 132, 0x084 */ SDL_SCANCODE_UNKNOWN, /* KEY_FRONT */
/* 133, 0x085 */ SDL_SCANCODE_COPY, /* KEY_COPY */
/* 134, 0x086 */ SDL_SCANCODE_UNKNOWN, /* KEY_OPEN */
/* 134, 0x086 */ SDL_SCANCODE_AC_OPEN, /* KEY_OPEN */
/* 135, 0x087 */ SDL_SCANCODE_PASTE, /* KEY_PASTE */
/* 136, 0x088 */ SDL_SCANCODE_FIND, /* KEY_FIND */
/* 137, 0x089 */ SDL_SCANCODE_CUT, /* KEY_CUT */
/* 138, 0x08a */ SDL_SCANCODE_HELP, /* KEY_HELP */
/* 139, 0x08b */ SDL_SCANCODE_MENU, /* KEY_MENU */
/* 140, 0x08c */ SDL_SCANCODE_CALCULATOR, /* KEY_CALC */
/* 140, 0x08c */ SDL_SCANCODE_UNKNOWN, /* KEY_CALC */
/* 141, 0x08d */ SDL_SCANCODE_UNKNOWN, /* KEY_SETUP */
/* 142, 0x08e */ SDL_SCANCODE_SLEEP, /* KEY_SLEEP */
/* 143, 0x08f */ SDL_SCANCODE_UNKNOWN, /* KEY_WAKEUP */
@ -174,40 +174,40 @@ static SDL_Scancode const linux_scancode_table[] = {
/* 145, 0x091 */ SDL_SCANCODE_UNKNOWN, /* KEY_SENDFILE */
/* 146, 0x092 */ SDL_SCANCODE_UNKNOWN, /* KEY_DELETEFILE */
/* 147, 0x093 */ SDL_SCANCODE_UNKNOWN, /* KEY_XFER */
/* 148, 0x094 */ SDL_SCANCODE_APP1, /* KEY_PROG1 */
/* 149, 0x095 */ SDL_SCANCODE_APP2, /* KEY_PROG2 */
/* 150, 0x096 */ SDL_SCANCODE_WWW, /* KEY_WWW */
/* 148, 0x094 */ SDL_SCANCODE_UNKNOWN, /* KEY_PROG1 */
/* 149, 0x095 */ SDL_SCANCODE_UNKNOWN, /* KEY_PROG2 */
/* 150, 0x096 */ SDL_SCANCODE_UNKNOWN, /* KEY_WWW */
/* 151, 0x097 */ SDL_SCANCODE_UNKNOWN, /* KEY_MSDOS */
/* 152, 0x098 */ SDL_SCANCODE_UNKNOWN, /* KEY_COFFEE */
/* 153, 0x099 */ SDL_SCANCODE_UNKNOWN, /* KEY_ROTATE_DISPLAY */
/* 154, 0x09a */ SDL_SCANCODE_UNKNOWN, /* KEY_CYCLEWINDOWS */
/* 155, 0x09b */ SDL_SCANCODE_MAIL, /* KEY_MAIL */
/* 155, 0x09b */ SDL_SCANCODE_UNKNOWN, /* KEY_MAIL */
/* 156, 0x09c */ SDL_SCANCODE_AC_BOOKMARKS, /* KEY_BOOKMARKS */
/* 157, 0x09d */ SDL_SCANCODE_COMPUTER, /* KEY_COMPUTER */
/* 157, 0x09d */ SDL_SCANCODE_UNKNOWN, /* KEY_COMPUTER */
/* 158, 0x09e */ SDL_SCANCODE_AC_BACK, /* KEY_BACK */
/* 159, 0x09f */ SDL_SCANCODE_AC_FORWARD, /* KEY_FORWARD */
/* 160, 0x0a0 */ SDL_SCANCODE_UNKNOWN, /* KEY_CLOSECD */
/* 161, 0x0a1 */ SDL_SCANCODE_EJECT, /* KEY_EJECTCD */
/* 162, 0x0a2 */ SDL_SCANCODE_EJECT, /* KEY_EJECTCLOSECD */
/* 163, 0x0a3 */ SDL_SCANCODE_AUDIONEXT, /* KEY_NEXTSONG */
/* 164, 0x0a4 */ SDL_SCANCODE_AUDIOPLAY, /* KEY_PLAYPAUSE */
/* 165, 0x0a5 */ SDL_SCANCODE_AUDIOPREV, /* KEY_PREVIOUSSONG */
/* 166, 0x0a6 */ SDL_SCANCODE_AUDIOSTOP, /* KEY_STOPCD */
/* 167, 0x0a7 */ SDL_SCANCODE_UNKNOWN, /* KEY_RECORD */
/* 168, 0x0a8 */ SDL_SCANCODE_AUDIOREWIND, /* KEY_REWIND */
/* 161, 0x0a1 */ SDL_SCANCODE_MEDIA_EJECT, /* KEY_EJECTCD */
/* 162, 0x0a2 */ SDL_SCANCODE_MEDIA_EJECT, /* KEY_EJECTCLOSECD */
/* 163, 0x0a3 */ SDL_SCANCODE_MEDIA_NEXT_TRACK, /* KEY_NEXTSONG */
/* 164, 0x0a4 */ SDL_SCANCODE_MEDIA_PLAY_PAUSE, /* KEY_PLAYPAUSE */
/* 165, 0x0a5 */ SDL_SCANCODE_MEDIA_PREVIOUS_TRACK, /* KEY_PREVIOUSSONG */
/* 166, 0x0a6 */ SDL_SCANCODE_MEDIA_STOP, /* KEY_STOPCD */
/* 167, 0x0a7 */ SDL_SCANCODE_MEDIA_RECORD, /* KEY_RECORD */
/* 168, 0x0a8 */ SDL_SCANCODE_MEDIA_REWIND, /* KEY_REWIND */
/* 169, 0x0a9 */ SDL_SCANCODE_UNKNOWN, /* KEY_PHONE */
/* 170, 0x0aa */ SDL_SCANCODE_UNKNOWN, /* KEY_ISO */
/* 171, 0x0ab */ SDL_SCANCODE_UNKNOWN, /* KEY_CONFIG */
/* 172, 0x0ac */ SDL_SCANCODE_AC_HOME, /* KEY_HOMEPAGE */
/* 173, 0x0ad */ SDL_SCANCODE_AC_REFRESH, /* KEY_REFRESH */
/* 174, 0x0ae */ SDL_SCANCODE_UNKNOWN, /* KEY_EXIT */
/* 174, 0x0ae */ SDL_SCANCODE_AC_EXIT, /* KEY_EXIT */
/* 175, 0x0af */ SDL_SCANCODE_UNKNOWN, /* KEY_MOVE */
/* 176, 0x0b0 */ SDL_SCANCODE_UNKNOWN, /* KEY_EDIT */
/* 177, 0x0b1 */ SDL_SCANCODE_UNKNOWN, /* KEY_SCROLLUP */
/* 178, 0x0b2 */ SDL_SCANCODE_UNKNOWN, /* KEY_SCROLLDOWN */
/* 179, 0x0b3 */ SDL_SCANCODE_KP_LEFTPAREN, /* KEY_KPLEFTPAREN */
/* 180, 0x0b4 */ SDL_SCANCODE_KP_RIGHTPAREN, /* KEY_KPRIGHTPAREN */
/* 181, 0x0b5 */ SDL_SCANCODE_UNKNOWN, /* KEY_NEW */
/* 181, 0x0b5 */ SDL_SCANCODE_AC_NEW, /* KEY_NEW */
/* 182, 0x0b6 */ SDL_SCANCODE_AGAIN, /* KEY_REDO */
/* 183, 0x0b7 */ SDL_SCANCODE_F13, /* KEY_F13 */
/* 184, 0x0b8 */ SDL_SCANCODE_F14, /* KEY_F14 */
@ -226,22 +226,22 @@ static SDL_Scancode const linux_scancode_table[] = {
/* 197, 0x0c5 */ SDL_SCANCODE_UNKNOWN,
/* 198, 0x0c6 */ SDL_SCANCODE_UNKNOWN,
/* 199, 0x0c7 */ SDL_SCANCODE_UNKNOWN,
/* 200, 0x0c8 */ SDL_SCANCODE_AUDIOPLAY, /* KEY_PLAYCD */
/* 201, 0x0c9 */ SDL_SCANCODE_UNKNOWN, /* KEY_PAUSECD */
/* 200, 0x0c8 */ SDL_SCANCODE_MEDIA_PLAY, /* KEY_PLAYCD */
/* 201, 0x0c9 */ SDL_SCANCODE_MEDIA_PAUSE, /* KEY_PAUSECD */
/* 202, 0x0ca */ SDL_SCANCODE_UNKNOWN, /* KEY_PROG3 */
/* 203, 0x0cb */ SDL_SCANCODE_UNKNOWN, /* KEY_PROG4 */
/* 204, 0x0cc */ SDL_SCANCODE_UNKNOWN, /* KEY_ALL_APPLICATIONS */
/* 205, 0x0cd */ SDL_SCANCODE_UNKNOWN, /* KEY_SUSPEND */
/* 206, 0x0ce */ SDL_SCANCODE_UNKNOWN, /* KEY_CLOSE */
/* 207, 0x0cf */ SDL_SCANCODE_AUDIOPLAY, /* KEY_PLAY */
/* 208, 0x0d0 */ SDL_SCANCODE_AUDIOFASTFORWARD, /* KEY_FASTFORWARD */
/* 206, 0x0ce */ SDL_SCANCODE_AC_CLOSE, /* KEY_CLOSE */
/* 207, 0x0cf */ SDL_SCANCODE_MEDIA_PLAY, /* KEY_PLAY */
/* 208, 0x0d0 */ SDL_SCANCODE_MEDIA_FAST_FORWARD, /* KEY_FASTFORWARD */
/* 209, 0x0d1 */ SDL_SCANCODE_UNKNOWN, /* KEY_BASSBOOST */
/* 210, 0x0d2 */ SDL_SCANCODE_PRINTSCREEN, /* KEY_PRINT */
/* 211, 0x0d3 */ SDL_SCANCODE_UNKNOWN, /* KEY_HP */
/* 212, 0x0d4 */ SDL_SCANCODE_UNKNOWN, /* KEY_CAMERA */
/* 213, 0x0d5 */ SDL_SCANCODE_UNKNOWN, /* KEY_SOUND */
/* 214, 0x0d6 */ SDL_SCANCODE_UNKNOWN, /* KEY_QUESTION */
/* 215, 0x0d7 */ SDL_SCANCODE_MAIL, /* KEY_EMAIL */
/* 215, 0x0d7 */ SDL_SCANCODE_UNKNOWN, /* KEY_EMAIL */
/* 216, 0x0d8 */ SDL_SCANCODE_UNKNOWN, /* KEY_CHAT */
/* 217, 0x0d9 */ SDL_SCANCODE_AC_SEARCH, /* KEY_SEARCH */
/* 218, 0x0da */ SDL_SCANCODE_UNKNOWN, /* KEY_CONNECT */
@ -250,17 +250,17 @@ static SDL_Scancode const linux_scancode_table[] = {
/* 221, 0x0dd */ SDL_SCANCODE_UNKNOWN, /* KEY_SHOP */
/* 222, 0x0de */ SDL_SCANCODE_ALTERASE, /* KEY_ALTERASE */
/* 223, 0x0df */ SDL_SCANCODE_CANCEL, /* KEY_CANCEL */
/* 224, 0x0e0 */ SDL_SCANCODE_BRIGHTNESSDOWN, /* KEY_BRIGHTNESSDOWN */
/* 225, 0x0e1 */ SDL_SCANCODE_BRIGHTNESSUP, /* KEY_BRIGHTNESSUP */
/* 226, 0x0e2 */ SDL_SCANCODE_MEDIASELECT, /* KEY_MEDIA */
/* 227, 0x0e3 */ SDL_SCANCODE_DISPLAYSWITCH, /* KEY_SWITCHVIDEOMODE */
/* 228, 0x0e4 */ SDL_SCANCODE_KBDILLUMTOGGLE, /* KEY_KBDILLUMTOGGLE */
/* 229, 0x0e5 */ SDL_SCANCODE_KBDILLUMDOWN, /* KEY_KBDILLUMDOWN */
/* 230, 0x0e6 */ SDL_SCANCODE_KBDILLUMUP, /* KEY_KBDILLUMUP */
/* 224, 0x0e0 */ SDL_SCANCODE_UNKNOWN, /* KEY_BRIGHTNESSDOWN */
/* 225, 0x0e1 */ SDL_SCANCODE_UNKNOWN, /* KEY_BRIGHTNESSUP */
/* 226, 0x0e2 */ SDL_SCANCODE_MEDIA_SELECT, /* KEY_MEDIA */
/* 227, 0x0e3 */ SDL_SCANCODE_UNKNOWN, /* KEY_SWITCHVIDEOMODE */
/* 228, 0x0e4 */ SDL_SCANCODE_UNKNOWN, /* KEY_KBDILLUMTOGGLE */
/* 229, 0x0e5 */ SDL_SCANCODE_UNKNOWN, /* KEY_KBDILLUMDOWN */
/* 230, 0x0e6 */ SDL_SCANCODE_UNKNOWN, /* KEY_KBDILLUMUP */
/* 231, 0x0e7 */ SDL_SCANCODE_UNKNOWN, /* KEY_SEND */
/* 232, 0x0e8 */ SDL_SCANCODE_UNKNOWN, /* KEY_REPLY */
/* 233, 0x0e9 */ SDL_SCANCODE_UNKNOWN, /* KEY_FORWARDMAIL */
/* 234, 0x0ea */ SDL_SCANCODE_UNKNOWN, /* KEY_SAVE */
/* 234, 0x0ea */ SDL_SCANCODE_AC_SAVE, /* KEY_SAVE */
/* 235, 0x0eb */ SDL_SCANCODE_UNKNOWN, /* KEY_DOCUMENTS */
/* 236, 0x0ec */ SDL_SCANCODE_UNKNOWN, /* KEY_BATTERY */
/* 237, 0x0ed */ SDL_SCANCODE_UNKNOWN, /* KEY_BLUETOOTH */

View File

@ -170,7 +170,7 @@ static const SDL_Scancode windows_scancode_table[] = {
/*0xe00d*/ SDL_SCANCODE_UNKNOWN,
/*0xe00e*/ SDL_SCANCODE_UNKNOWN,
/*0xe00f*/ SDL_SCANCODE_UNKNOWN,
/*0xe010*/ SDL_SCANCODE_AUDIOPREV,
/*0xe010*/ SDL_SCANCODE_MEDIA_PREVIOUS_TRACK,
/*0xe011*/ SDL_SCANCODE_UNKNOWN,
/*0xe012*/ SDL_SCANCODE_UNKNOWN,
/*0xe013*/ SDL_SCANCODE_UNKNOWN,
@ -179,7 +179,7 @@ static const SDL_Scancode windows_scancode_table[] = {
/*0xe016*/ SDL_SCANCODE_UNKNOWN,
/*0xe017*/ SDL_SCANCODE_CUT,
/*0xe018*/ SDL_SCANCODE_COPY,
/*0xe019*/ SDL_SCANCODE_AUDIONEXT,
/*0xe019*/ SDL_SCANCODE_MEDIA_NEXT_TRACK,
/*0xe01a*/ SDL_SCANCODE_UNKNOWN,
/*0xe01b*/ SDL_SCANCODE_UNKNOWN,
/*0xe01c*/ SDL_SCANCODE_KP_ENTER,
@ -187,10 +187,10 @@ static const SDL_Scancode windows_scancode_table[] = {
/*0xe01e*/ SDL_SCANCODE_UNKNOWN,
/*0xe01f*/ SDL_SCANCODE_UNKNOWN,
/*0xe020*/ SDL_SCANCODE_MUTE,
/*0xe021*/ SDL_SCANCODE_CALCULATOR,
/*0xe022*/ SDL_SCANCODE_AUDIOPLAY,
/*0xe021*/ SDL_SCANCODE_UNKNOWN, /* LaunchApp2 */
/*0xe022*/ SDL_SCANCODE_MEDIA_PLAY_PAUSE,
/*0xe023*/ SDL_SCANCODE_UNKNOWN,
/*0xe024*/ SDL_SCANCODE_AUDIOSTOP,
/*0xe024*/ SDL_SCANCODE_MEDIA_STOP,
/*0xe025*/ SDL_SCANCODE_UNKNOWN,
/*0xe026*/ SDL_SCANCODE_UNKNOWN,
/*0xe027*/ SDL_SCANCODE_UNKNOWN,
@ -198,7 +198,7 @@ static const SDL_Scancode windows_scancode_table[] = {
/*0xe029*/ SDL_SCANCODE_UNKNOWN,
/*0xe02a*/ SDL_SCANCODE_UNKNOWN,
/*0xe02b*/ SDL_SCANCODE_UNKNOWN,
/*0xe02c*/ SDL_SCANCODE_EJECT,
/*0xe02c*/ SDL_SCANCODE_MEDIA_EJECT,
/*0xe02d*/ SDL_SCANCODE_UNKNOWN,
/*0xe02e*/ SDL_SCANCODE_VOLUMEDOWN,
/*0xe02f*/ SDL_SCANCODE_UNKNOWN,
@ -261,9 +261,9 @@ static const SDL_Scancode windows_scancode_table[] = {
/*0xe068*/ SDL_SCANCODE_AC_STOP,
/*0xe069*/ SDL_SCANCODE_AC_FORWARD,
/*0xe06a*/ SDL_SCANCODE_AC_BACK,
/*0xe06b*/ SDL_SCANCODE_COMPUTER,
/*0xe06c*/ SDL_SCANCODE_MAIL,
/*0xe06d*/ SDL_SCANCODE_MEDIASELECT,
/*0xe06b*/ SDL_SCANCODE_UNKNOWN, /* LaunchApp1 */
/*0xe06c*/ SDL_SCANCODE_UNKNOWN, /* LaunchMail */
/*0xe06d*/ SDL_SCANCODE_MEDIA_SELECT,
/*0xe06e*/ SDL_SCANCODE_UNKNOWN,
/*0xe06f*/ SDL_SCANCODE_UNKNOWN,
/*0xe070*/ SDL_SCANCODE_UNKNOWN,

View File

@ -122,7 +122,7 @@ static const SDL_Scancode xfree86_scancode_table[] = {
/* 90 */ SDL_SCANCODE_UP,
/* 91 */ SDL_SCANCODE_PAGEUP,
/* 92 */ SDL_SCANCODE_LEFT,
/* 93 */ SDL_SCANCODE_BRIGHTNESSDOWN, /* on PowerBook G4 / KEY_Begin */
/* 93 */ SDL_SCANCODE_UNKNOWN, /* on PowerBook G4 / KEY_Begin */
/* 94 */ SDL_SCANCODE_RIGHT,
/* 95 */ SDL_SCANCODE_END,
/* 96 */ SDL_SCANCODE_DOWN,
@ -320,7 +320,7 @@ static const SDL_Scancode xfree86_scancode_table2[] = {
/* 137, 0x089 */ SDL_SCANCODE_CUT, /* XF86Cut */
/* 138, 0x08a */ SDL_SCANCODE_HELP, /* Help */
/* 139, 0x08b */ SDL_SCANCODE_MENU, /* XF86MenuKB */
/* 140, 0x08c */ SDL_SCANCODE_CALCULATOR, /* XF86Calculator */
/* 140, 0x08c */ SDL_SCANCODE_UNKNOWN, /* XF86Calculator */
/* 141, 0x08d */ SDL_SCANCODE_UNKNOWN, /* NoSymbol */
/* 142, 0x08e */ SDL_SCANCODE_SLEEP, /* XF86Sleep */
/* 143, 0x08f */ SDL_SCANCODE_UNKNOWN, /* XF86WakeUp */
@ -328,27 +328,27 @@ static const SDL_Scancode xfree86_scancode_table2[] = {
/* 145, 0x091 */ SDL_SCANCODE_UNKNOWN, /* XF86Send */
/* 146, 0x092 */ SDL_SCANCODE_UNKNOWN, /* NoSymbol */
/* 147, 0x093 */ SDL_SCANCODE_UNKNOWN, /* XF86Xfer */
/* 148, 0x094 */ SDL_SCANCODE_APP1, /* XF86Launch1 */
/* 149, 0x095 */ SDL_SCANCODE_APP2, /* XF86Launch2 */
/* 150, 0x096 */ SDL_SCANCODE_WWW, /* XF86WWW */
/* 148, 0x094 */ SDL_SCANCODE_UNKNOWN, /* XF86Launch1 */
/* 149, 0x095 */ SDL_SCANCODE_UNKNOWN, /* XF86Launch2 */
/* 150, 0x096 */ SDL_SCANCODE_UNKNOWN, /* XF86WWW */
/* 151, 0x097 */ SDL_SCANCODE_UNKNOWN, /* XF86DOS */
/* 152, 0x098 */ SDL_SCANCODE_UNKNOWN, /* XF86ScreenSaver */
/* 153, 0x099 */ SDL_SCANCODE_UNKNOWN, /* XF86RotateWindows */
/* 154, 0x09a */ SDL_SCANCODE_UNKNOWN, /* XF86TaskPane */
/* 155, 0x09b */ SDL_SCANCODE_MAIL, /* XF86Mail */
/* 155, 0x09b */ SDL_SCANCODE_UNKNOWN, /* XF86Mail */
/* 156, 0x09c */ SDL_SCANCODE_AC_BOOKMARKS, /* XF86Favorites */
/* 157, 0x09d */ SDL_SCANCODE_COMPUTER, /* XF86MyComputer */
/* 157, 0x09d */ SDL_SCANCODE_UNKNOWN, /* XF86MyComputer */
/* 158, 0x09e */ SDL_SCANCODE_AC_BACK, /* XF86Back */
/* 159, 0x09f */ SDL_SCANCODE_AC_FORWARD, /* XF86Forward */
/* 160, 0x0a0 */ SDL_SCANCODE_UNKNOWN, /* NoSymbol */
/* 161, 0x0a1 */ SDL_SCANCODE_EJECT, /* XF86Eject */
/* 162, 0x0a2 */ SDL_SCANCODE_EJECT, /* XF86Eject */
/* 163, 0x0a3 */ SDL_SCANCODE_AUDIONEXT, /* XF86AudioNext */
/* 164, 0x0a4 */ SDL_SCANCODE_AUDIOPLAY, /* XF86AudioPlay */
/* 165, 0x0a5 */ SDL_SCANCODE_AUDIOPREV, /* XF86AudioPrev */
/* 166, 0x0a6 */ SDL_SCANCODE_AUDIOSTOP, /* XF86AudioStop */
/* 167, 0x0a7 */ SDL_SCANCODE_UNKNOWN, /* XF86AudioRecord */
/* 168, 0x0a8 */ SDL_SCANCODE_AUDIOREWIND, /* XF86AudioRewind */
/* 161, 0x0a1 */ SDL_SCANCODE_MEDIA_EJECT, /* XF86Eject */
/* 162, 0x0a2 */ SDL_SCANCODE_MEDIA_EJECT, /* XF86Eject */
/* 163, 0x0a3 */ SDL_SCANCODE_MEDIA_NEXT_TRACK, /* XF86AudioNext */
/* 164, 0x0a4 */ SDL_SCANCODE_MEDIA_PLAY_PAUSE, /* XF86AudioPlay */
/* 165, 0x0a5 */ SDL_SCANCODE_MEDIA_PREVIOUS_TRACK, /* XF86AudioPrev */
/* 166, 0x0a6 */ SDL_SCANCODE_MEDIA_STOP, /* XF86AudioStop */
/* 167, 0x0a7 */ SDL_SCANCODE_MEDIA_RECORD, /* XF86AudioRecord */
/* 168, 0x0a8 */ SDL_SCANCODE_MEDIA_REWIND, /* XF86AudioRewind */
/* 169, 0x0a9 */ SDL_SCANCODE_UNKNOWN, /* XF86Phone */
/* 170, 0x0aa */ SDL_SCANCODE_UNKNOWN, /* NoSymbol */
/* 171, 0x0ab */ SDL_SCANCODE_F13, /* XF86Tools */
@ -361,7 +361,7 @@ static const SDL_Scancode xfree86_scancode_table2[] = {
/* 178, 0x0b2 */ SDL_SCANCODE_UNKNOWN, /* XF86ScrollDown */
/* 179, 0x0b3 */ SDL_SCANCODE_KP_LEFTPAREN, /* parenleft */
/* 180, 0x0b4 */ SDL_SCANCODE_KP_RIGHTPAREN, /* parenright */
/* 181, 0x0b5 */ SDL_SCANCODE_UNKNOWN, /* XF86New */
/* 181, 0x0b5 */ SDL_SCANCODE_AC_NEW, /* XF86New */
/* 182, 0x0b6 */ SDL_SCANCODE_AGAIN, /* Redo */
/* 183, 0x0b7 */ SDL_SCANCODE_F13, /* XF86Tools */
/* 184, 0x0b8 */ SDL_SCANCODE_F14, /* XF86Launch5 */
@ -380,22 +380,22 @@ static const SDL_Scancode xfree86_scancode_table2[] = {
/* 197, 0x0c5 */ SDL_SCANCODE_UNKNOWN, /* NoSymbol */
/* 198, 0x0c6 */ SDL_SCANCODE_UNKNOWN, /* NoSymbol */
/* 199, 0x0c7 */ SDL_SCANCODE_UNKNOWN, /* NoSymbol */
/* 200, 0x0c8 */ SDL_SCANCODE_AUDIOPLAY, /* XF86AudioPlay */
/* 201, 0x0c9 */ SDL_SCANCODE_UNKNOWN, /* XF86AudioPause */
/* 200, 0x0c8 */ SDL_SCANCODE_MEDIA_PLAY, /* XF86AudioPlay */
/* 201, 0x0c9 */ SDL_SCANCODE_MEDIA_PAUSE, /* XF86AudioPause */
/* 202, 0x0ca */ SDL_SCANCODE_UNKNOWN, /* XF86Launch3 */
/* 203, 0x0cb */ SDL_SCANCODE_UNKNOWN, /* XF86Launch4 */
/* 204, 0x0cc */ SDL_SCANCODE_UNKNOWN, /* XF86LaunchB */
/* 205, 0x0cd */ SDL_SCANCODE_UNKNOWN, /* XF86Suspend */
/* 206, 0x0ce */ SDL_SCANCODE_UNKNOWN, /* XF86Close */
/* 207, 0x0cf */ SDL_SCANCODE_AUDIOPLAY, /* XF86AudioPlay */
/* 208, 0x0d0 */ SDL_SCANCODE_AUDIOFASTFORWARD, /* XF86AudioForward */
/* 206, 0x0ce */ SDL_SCANCODE_AC_CLOSE, /* XF86Close */
/* 207, 0x0cf */ SDL_SCANCODE_MEDIA_PLAY, /* XF86AudioPlay */
/* 208, 0x0d0 */ SDL_SCANCODE_MEDIA_FAST_FORWARD, /* XF86AudioForward */
/* 209, 0x0d1 */ SDL_SCANCODE_UNKNOWN, /* NoSymbol */
/* 210, 0x0d2 */ SDL_SCANCODE_PRINTSCREEN, /* Print */
/* 211, 0x0d3 */ SDL_SCANCODE_UNKNOWN, /* NoSymbol */
/* 212, 0x0d4 */ SDL_SCANCODE_UNKNOWN, /* XF86WebCam */
/* 213, 0x0d5 */ SDL_SCANCODE_UNKNOWN, /* XF86AudioPreset */
/* 214, 0x0d6 */ SDL_SCANCODE_UNKNOWN, /* NoSymbol */
/* 215, 0x0d7 */ SDL_SCANCODE_MAIL, /* XF86Mail */
/* 215, 0x0d7 */ SDL_SCANCODE_UNKNOWN, /* XF86Mail */
/* 216, 0x0d8 */ SDL_SCANCODE_UNKNOWN, /* XF86Messenger */
/* 217, 0x0d9 */ SDL_SCANCODE_AC_SEARCH, /* XF86Search */
/* 218, 0x0da */ SDL_SCANCODE_UNKNOWN, /* XF86Go */
@ -404,13 +404,13 @@ static const SDL_Scancode xfree86_scancode_table2[] = {
/* 221, 0x0dd */ SDL_SCANCODE_UNKNOWN, /* XF86Shop */
/* 222, 0x0de */ SDL_SCANCODE_UNKNOWN, /* NoSymbol */
/* 223, 0x0df */ SDL_SCANCODE_CANCEL, /* Cancel */
/* 224, 0x0e0 */ SDL_SCANCODE_BRIGHTNESSDOWN, /* XF86MonBrightnessDown */
/* 225, 0x0e1 */ SDL_SCANCODE_BRIGHTNESSUP, /* XF86MonBrightnessUp */
/* 226, 0x0e2 */ SDL_SCANCODE_MEDIASELECT, /* XF86AudioMedia */
/* 227, 0x0e3 */ SDL_SCANCODE_DISPLAYSWITCH, /* XF86Display */
/* 228, 0x0e4 */ SDL_SCANCODE_KBDILLUMTOGGLE, /* XF86KbdLightOnOff */
/* 229, 0x0e5 */ SDL_SCANCODE_KBDILLUMDOWN, /* XF86KbdBrightnessDown */
/* 230, 0x0e6 */ SDL_SCANCODE_KBDILLUMUP, /* XF86KbdBrightnessUp */
/* 224, 0x0e0 */ SDL_SCANCODE_UNKNOWN, /* XF86MonBrightnessDown */
/* 225, 0x0e1 */ SDL_SCANCODE_UNKNOWN, /* XF86MonBrightnessUp */
/* 226, 0x0e2 */ SDL_SCANCODE_MEDIA_SELECT, /* XF86AudioMedia */
/* 227, 0x0e3 */ SDL_SCANCODE_UNKNOWN, /* XF86Display */
/* 228, 0x0e4 */ SDL_SCANCODE_UNKNOWN, /* XF86KbdLightOnOff */
/* 229, 0x0e5 */ SDL_SCANCODE_UNKNOWN, /* XF86KbdBrightnessDown */
/* 230, 0x0e6 */ SDL_SCANCODE_UNKNOWN, /* XF86KbdBrightnessUp */
/* 231, 0x0e7 */ SDL_SCANCODE_UNKNOWN, /* XF86Send */
/* 232, 0x0e8 */ SDL_SCANCODE_UNKNOWN, /* XF86Reply */
/* 233, 0x0e9 */ SDL_SCANCODE_UNKNOWN, /* XF86MailForward */

View File

@ -95,8 +95,8 @@ static SDL_Scancode Android_Keycodes[] = {
SDL_SCANCODE_TAB, /* AKEYCODE_TAB */
SDL_SCANCODE_SPACE, /* AKEYCODE_SPACE */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_SYM */
SDL_SCANCODE_WWW, /* AKEYCODE_EXPLORER */
SDL_SCANCODE_MAIL, /* AKEYCODE_ENVELOPE */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_EXPLORER */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_ENVELOPE */
SDL_SCANCODE_RETURN, /* AKEYCODE_ENTER */
SDL_SCANCODE_BACKSPACE, /* AKEYCODE_DEL */
SDL_SCANCODE_GRAVE, /* AKEYCODE_GRAVE */
@ -116,12 +116,12 @@ static SDL_Scancode Android_Keycodes[] = {
SDL_SCANCODE_MENU, /* AKEYCODE_MENU */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NOTIFICATION */
SDL_SCANCODE_AC_SEARCH, /* AKEYCODE_SEARCH */
SDL_SCANCODE_AUDIOPLAY, /* AKEYCODE_MEDIA_PLAY_PAUSE */
SDL_SCANCODE_AUDIOSTOP, /* AKEYCODE_MEDIA_STOP */
SDL_SCANCODE_AUDIONEXT, /* AKEYCODE_MEDIA_NEXT */
SDL_SCANCODE_AUDIOPREV, /* AKEYCODE_MEDIA_PREVIOUS */
SDL_SCANCODE_AUDIOREWIND, /* AKEYCODE_MEDIA_REWIND */
SDL_SCANCODE_AUDIOFASTFORWARD, /* AKEYCODE_MEDIA_FAST_FORWARD */
SDL_SCANCODE_MEDIA_PLAY_PAUSE, /* AKEYCODE_MEDIA_PLAY_PAUSE */
SDL_SCANCODE_MEDIA_STOP, /* AKEYCODE_MEDIA_STOP */
SDL_SCANCODE_MEDIA_NEXT_TRACK, /* AKEYCODE_MEDIA_NEXT */
SDL_SCANCODE_MEDIA_PREVIOUS_TRACK, /* AKEYCODE_MEDIA_PREVIOUS */
SDL_SCANCODE_MEDIA_REWIND, /* AKEYCODE_MEDIA_REWIND */
SDL_SCANCODE_MEDIA_FAST_FORWARD, /* AKEYCODE_MEDIA_FAST_FORWARD */
SDL_SCANCODE_MUTE, /* AKEYCODE_MUTE */
SDL_SCANCODE_PAGEUP, /* AKEYCODE_PAGE_UP */
SDL_SCANCODE_PAGEDOWN, /* AKEYCODE_PAGE_DOWN */
@ -157,11 +157,11 @@ static SDL_Scancode Android_Keycodes[] = {
SDL_SCANCODE_END, /* AKEYCODE_MOVE_END */
SDL_SCANCODE_INSERT, /* AKEYCODE_INSERT */
SDL_SCANCODE_AC_FORWARD, /* AKEYCODE_FORWARD */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_PLAY */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_PAUSE */
SDL_SCANCODE_MEDIA_PLAY, /* AKEYCODE_MEDIA_PLAY */
SDL_SCANCODE_MEDIA_PAUSE, /* AKEYCODE_MEDIA_PAUSE */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_CLOSE */
SDL_SCANCODE_EJECT, /* AKEYCODE_MEDIA_EJECT */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_RECORD */
SDL_SCANCODE_MEDIA_EJECT, /* AKEYCODE_MEDIA_EJECT */
SDL_SCANCODE_MEDIA_RECORD, /* AKEYCODE_MEDIA_RECORD */
SDL_SCANCODE_F1, /* AKEYCODE_F1 */
SDL_SCANCODE_F2, /* AKEYCODE_F2 */
SDL_SCANCODE_F3, /* AKEYCODE_F3 */
@ -174,7 +174,7 @@ static SDL_Scancode Android_Keycodes[] = {
SDL_SCANCODE_F10, /* AKEYCODE_F10 */
SDL_SCANCODE_F11, /* AKEYCODE_F11 */
SDL_SCANCODE_F12, /* AKEYCODE_F12 */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_NUM_LOCK */
SDL_SCANCODE_NUMLOCKCLEAR, /* AKEYCODE_NUM_LOCK */
SDL_SCANCODE_KP_0, /* AKEYCODE_NUMPAD_0 */
SDL_SCANCODE_KP_1, /* AKEYCODE_NUMPAD_1 */
SDL_SCANCODE_KP_2, /* AKEYCODE_NUMPAD_2 */
@ -197,8 +197,8 @@ static SDL_Scancode Android_Keycodes[] = {
SDL_SCANCODE_KP_RIGHTPAREN, /* AKEYCODE_NUMPAD_RIGHT_PAREN */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_VOLUME_MUTE */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_INFO */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CHANNEL_UP */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CHANNEL_DOWN */
SDL_SCANCODE_CHANNEL_INCREMENT, /* AKEYCODE_CHANNEL_UP */
SDL_SCANCODE_CHANNEL_INCREMENT, /* AKEYCODE_CHANNEL_DOWN */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_ZOOM_IN */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_ZOOM_OUT */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_TV */
@ -241,7 +241,7 @@ static SDL_Scancode Android_Keycodes[] = {
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CONTACTS */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CALENDAR */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MUSIC */
SDL_SCANCODE_CALCULATOR, /* AKEYCODE_CALCULATOR */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CALCULATOR */
SDL_SCANCODE_LANG5, /* AKEYCODE_ZENKAKU_HANKAKU */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_EISU */
SDL_SCANCODE_INTERNATIONAL5, /* AKEYCODE_MUHENKAN */
@ -251,8 +251,8 @@ static SDL_Scancode Android_Keycodes[] = {
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_RO */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_KANA */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_ASSIST */
SDL_SCANCODE_BRIGHTNESSDOWN, /* AKEYCODE_BRIGHTNESS_DOWN */
SDL_SCANCODE_BRIGHTNESSUP, /* AKEYCODE_BRIGHTNESS_UP */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BRIGHTNESS_DOWN */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_BRIGHTNESS_UP */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_MEDIA_AUDIO_TRACK */
SDL_SCANCODE_SLEEP, /* AKEYCODE_SLEEP */
SDL_SCANCODE_UNKNOWN, /* AKEYCODE_WAKEUP */

View File

@ -215,12 +215,12 @@ static const SDL_Keycode emscripten_keycode_table[] = {
/* 173 */ SDLK_MINUS, /*FX*/
/* 174 */ SDLK_VOLUMEDOWN, /*IE, Chrome*/
/* 175 */ SDLK_VOLUMEUP, /*IE, Chrome*/
/* 176 */ SDLK_AUDIONEXT, /*IE, Chrome*/
/* 177 */ SDLK_AUDIOPREV, /*IE, Chrome*/
/* 176 */ SDLK_MEDIA_NEXT_TRACK, /*IE, Chrome*/
/* 177 */ SDLK_MEDIA_PREVIOUS_TRACK, /*IE, Chrome*/
/* 178 */ SDLK_UNKNOWN,
/* 179 */ SDLK_AUDIOPLAY, /*IE, Chrome*/
/* 179 */ SDLK_MEDIA_PLAY, /*IE, Chrome*/
/* 180 */ SDLK_UNKNOWN,
/* 181 */ SDLK_AUDIOMUTE, /*FX*/
/* 181 */ SDLK_UNKNOWN,
/* 182 */ SDLK_VOLUMEDOWN, /*FX*/
/* 183 */ SDLK_VOLUMEUP, /*FX*/
/* 184 */ SDLK_UNKNOWN,
@ -410,27 +410,25 @@ static SDL_Scancode Emscripten_MapScanCode(const char *code)
case DOM_PK_PASTE:
return SDL_SCANCODE_PASTE;
case DOM_PK_MEDIA_TRACK_PREVIOUS:
return SDL_SCANCODE_AUDIOPREV;
return SDL_SCANCODE_MEDIA_PREVIOUS_TRACK;
case DOM_PK_CUT:
return SDL_SCANCODE_CUT;
case DOM_PK_COPY:
return SDL_SCANCODE_COPY;
case DOM_PK_MEDIA_TRACK_NEXT:
return SDL_SCANCODE_AUDIONEXT;
return SDL_SCANCODE_MEDIA_NEXT_TRACK;
case DOM_PK_NUMPAD_ENTER:
return SDL_SCANCODE_KP_ENTER;
case DOM_PK_CONTROL_RIGHT:
return SDL_SCANCODE_RCTRL;
case DOM_PK_AUDIO_VOLUME_MUTE:
return SDL_SCANCODE_AUDIOMUTE;
case DOM_PK_LAUNCH_APP_2:
return SDL_SCANCODE_CALCULATOR;
return SDL_SCANCODE_MUTE;
case DOM_PK_MEDIA_PLAY_PAUSE:
return SDL_SCANCODE_AUDIOPLAY;
return SDL_SCANCODE_MEDIA_PLAY_PAUSE;
case DOM_PK_MEDIA_STOP:
return SDL_SCANCODE_AUDIOSTOP;
return SDL_SCANCODE_MEDIA_STOP;
case DOM_PK_EJECT:
return SDL_SCANCODE_EJECT;
return SDL_SCANCODE_MEDIA_EJECT;
case DOM_PK_AUDIO_VOLUME_DOWN:
return SDL_SCANCODE_VOLUMEDOWN;
case DOM_PK_AUDIO_VOLUME_UP:
@ -485,12 +483,8 @@ static SDL_Scancode Emscripten_MapScanCode(const char *code)
return SDL_SCANCODE_AC_FORWARD;
case DOM_PK_BROWSER_BACK:
return SDL_SCANCODE_AC_BACK;
case DOM_PK_LAUNCH_APP_1:
return SDL_SCANCODE_COMPUTER;
case DOM_PK_LAUNCH_MAIL:
return SDL_SCANCODE_MAIL;
case DOM_PK_MEDIA_SELECT:
return SDL_SCANCODE_MEDIASELECT;
return SDL_SCANCODE_MEDIA_SELECT;
}
return SDL_SCANCODE_UNKNOWN;
@ -801,11 +795,43 @@ static EM_BOOL Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent
SDL_bool prevent_default = SDL_TRUE;
SDL_bool is_nav_key = SDL_FALSE;
if (scancode == SDL_SCANCODE_UNKNOWN) {
if (SDL_strcmp(keyEvent->key, "Sleep") == 0) {
scancode = SDL_SCANCODE_SLEEP;
} else if (SDL_strcmp(keyEvent->key, "ChannelUp") == 0) {
scancode = SDL_SCANCODE_CHANNEL_INCREMENT;
} else if (SDL_strcmp(keyEvent->key, "ChannelDown") == 0) {
scancode = SDL_SCANCODE_CHANNEL_DECREMENT;
} else if (SDL_strcmp(keyEvent->key, "MediaPlay") == 0) {
scancode = SDL_SCANCODE_MEDIA_PLAY;
} else if (SDL_strcmp(keyEvent->key, "MediaPause") == 0) {
scancode = SDL_SCANCODE_MEDIA_PAUSE;
} else if (SDL_strcmp(keyEvent->key, "MediaRecord") == 0) {
scancode = SDL_SCANCODE_MEDIA_RECORD;
} else if (SDL_strcmp(keyEvent->key, "MediaFastForward") == 0) {
scancode = SDL_SCANCODE_MEDIA_FAST_FORWARD;
} else if (SDL_strcmp(keyEvent->key, "MediaRewind") == 0) {
scancode = SDL_SCANCODE_MEDIA_REWIND;
} else if (SDL_strcmp(keyEvent->key, "Close") == 0) {
scancode = SDL_SCANCODE_AC_CLOSE;
} else if (SDL_strcmp(keyEvent->key, "New") == 0) {
scancode = SDL_SCANCODE_AC_NEW;
} else if (SDL_strcmp(keyEvent->key, "Open") == 0) {
scancode = SDL_SCANCODE_AC_OPEN;
} else if (SDL_strcmp(keyEvent->key, "Print") == 0) {
scancode = SDL_SCANCODE_AC_PRINT;
} else if (SDL_strcmp(keyEvent->key, "Save") == 0) {
scancode = SDL_SCANCODE_AC_SAVE;
} else if (SDL_strcmp(keyEvent->key, "Props") == 0) {
scancode = SDL_SCANCODE_AC_PROPERTIES;
}
}
if (scancode == SDL_SCANCODE_UNKNOWN) {
/* KaiOS Left Soft Key and Right Soft Key, they act as OK/Next/Menu and Cancel/Back/Clear */
if (SDL_strncmp(keyEvent->key, "SoftLeft", 9) == 0) {
if (SDL_strcmp(keyEvent->key, "SoftLeft") == 0) {
scancode = SDL_SCANCODE_AC_FORWARD;
} else if (SDL_strncmp(keyEvent->key, "SoftRight", 10) == 0) {
} else if (SDL_strcmp(keyEvent->key, "SoftRight") == 0) {
scancode = SDL_SCANCODE_AC_BACK;
}
}

View File

@ -79,9 +79,9 @@ static int keyboard_getKeyFromName(void *arg)
SDLTest_AssertCheck(result == SDLK_FIND, "Verify result from call, expected: %d, got: %" SDL_PRIs32, SDLK_FIND, result);
/* Case where Key is known, multiple character input */
result = SDL_GetKeyFromName("AudioStop");
result = SDL_GetKeyFromName("MediaStop");
SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/multi)");
SDLTest_AssertCheck(result == SDLK_AUDIOSTOP, "Verify result from call, expected: %d, got: %" SDL_PRIs32, SDLK_AUDIOSTOP, result);
SDLTest_AssertCheck(result == SDLK_MEDIA_STOP, "Verify result from call, expected: %d, got: %" SDL_PRIs32, SDLK_MEDIA_STOP, result);
/* Case where Key is unknown */
result = SDL_GetKeyFromName("NotThere");
@ -191,8 +191,8 @@ static int keyboard_getKeyName(void *arg)
SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: %s, got: %s", expected, result);
/* Case where key has a N character name */
expected = "BrightnessUp";
result = SDL_GetKeyName(SDLK_BRIGHTNESSUP);
expected = "MediaPlay";
result = SDL_GetKeyName(SDLK_MEDIA_PLAY);
SDLTest_AssertPass("Call to SDL_GetKeyName()");
SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL");
SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: %s, got: %s", expected, result);