Add SDL_SCANCODE_CALL and SDL_SCANCODE_ENDCALL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
diff --git a/include/SDL_keycode.h b/include/SDL_keycode.h
index 5e8edcb..65420f2 100644
--- a/include/SDL_keycode.h
+++ b/include/SDL_keycode.h
@@ -321,7 +321,9 @@ typedef enum
SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD),
SDLK_SOFTLEFT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTLEFT),
- SDLK_SOFTRIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT)
+ SDLK_SOFTRIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT),
+ SDLK_CALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALL),
+ SDLK_ENDCALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ENDCALL)
} SDL_KeyCode;
/**
diff --git a/include/SDL_scancode.h b/include/SDL_scancode.h
index f203e30..aaa782f 100644
--- a/include/SDL_scancode.h
+++ b/include/SDL_scancode.h
@@ -417,6 +417,8 @@ typedef enum
used as a multi-function feature key for selecting
a software defined function shown on the bottom right
of the display. */
+ SDL_SCANCODE_CALL = 289, /**< Used for accepting phone calls. */
+ SDL_SCANCODE_ENDCALL = 290, /**< Used for rejecting phone calls. */
/* @} *//* Mobile keys */
diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c
index 100e6aa..be1b795 100644
--- a/src/events/SDL_keyboard.c
+++ b/src/events/SDL_keyboard.c
@@ -284,6 +284,8 @@ static const SDL_Keycode SDL_default_keymap[SDL_NUM_SCANCODES] = {
SDLK_AUDIOFASTFORWARD,
SDLK_SOFTLEFT,
SDLK_SOFTRIGHT,
+ SDLK_CALL,
+ SDLK_ENDCALL,
};
static const char *SDL_scancode_names[SDL_NUM_SCANCODES] = {
@@ -522,6 +524,8 @@ static const char *SDL_scancode_names[SDL_NUM_SCANCODES] = {
"AudioFastForward",
"SoftLeft",
"SoftRight",
+ "Call",
+ "EndCall",
};
/* Taken from SDL_iconv() */
diff --git a/src/video/android/SDL_androidkeyboard.c b/src/video/android/SDL_androidkeyboard.c
index ce79883..9bb0255 100644
--- a/src/video/android/SDL_androidkeyboard.c
+++ b/src/video/android/SDL_androidkeyboard.c
@@ -45,8 +45,8 @@ static SDL_Scancode Android_Keycodes[] = {
SDL_SCANCODE_SOFTRIGHT, /* AKEYCODE_SOFT_RIGHT */
SDL_SCANCODE_AC_HOME, /* AKEYCODE_HOME */
SDL_SCANCODE_AC_BACK, /* AKEYCODE_BACK */
- SDL_SCANCODE_UNKNOWN, /* AKEYCODE_CALL */
- SDL_SCANCODE_UNKNOWN, /* AKEYCODE_ENDCALL */
+ SDL_SCANCODE_CALL, /* AKEYCODE_CALL */
+ SDL_SCANCODE_ENDCALL, /* AKEYCODE_ENDCALL */
SDL_SCANCODE_0, /* AKEYCODE_0 */
SDL_SCANCODE_1, /* AKEYCODE_1 */
SDL_SCANCODE_2, /* AKEYCODE_2 */
diff --git a/src/video/ngage/SDL_ngageevents.cpp b/src/video/ngage/SDL_ngageevents.cpp
index 4909354..659548a 100644
--- a/src/video/ngage/SDL_ngageevents.cpp
+++ b/src/video/ngage/SDL_ngageevents.cpp
@@ -122,10 +122,10 @@ static SDL_Scancode ConvertScancode(_THIS, int key)
keycode = SDLK_SOFTRIGHT;
break;
case EStdKeyApplication0: // Green softkey
- keycode = SDLK_F3;
+ keycode = SDLK_CALL;
break;
case EStdKeyApplication1: // Red softkey
- keycode = SDLK_F4;
+ keycode = SDLK_ENDCALL;
break;
case EStdKeyDevice3: // Middle softkey
keycode = SDLK_RETURN;