Add extended keys(latam)

This commit is contained in:
latot 2015-12-27 15:45:50 -03:00
parent 29eea477b9
commit c7b98b84c2
3 changed files with 19 additions and 2 deletions

View File

@ -606,6 +606,10 @@ const KeyMap_IntStrPair key_names[] = {
{NKCODE_EXT_MOUSEBUTTON_3, "MB3"},
{NKCODE_EXT_MOUSEWHEEL_UP, "MWheelU"},
{NKCODE_EXT_MOUSEWHEEL_DOWN, "MWheelD"},
{NKCODE_START_QUESTION, "¿"},
{NKCODE_LEFTBRACE, "{"},
{NKCODE_RIGHTBRACE, "}"},
};
const KeyMap_IntStrPair axis_names[] = {

View File

@ -5,6 +5,7 @@
// TODO: Add any missing keys
static const std::map<int, int> KeyMapRawSDLtoNative = InitConstMap<int, int>
(SDL_SCANCODE_UNKNOWN, NKCODE_UNKNOWN)
(SDLK_p, NKCODE_P)
(SDLK_o, NKCODE_O)
(SDLK_i, NKCODE_I)
@ -46,7 +47,7 @@ static const std::map<int, int> KeyMapRawSDLtoNative = InitConstMap<int, int>
(SDLK_RIGHTBRACKET, NKCODE_RIGHT_BRACKET)
(SDLK_BACKSLASH, NKCODE_BACKSLASH)
(SDLK_SEMICOLON, NKCODE_SEMICOLON)
// (SDLK_, NKCODE_APOSTROPHE) // I cannot find the SDL equiv
(SDL_SCANCODE_0, NKCODE_APOSTROPHE)
(SDLK_SLASH, NKCODE_SLASH)
(SDLK_AT, NKCODE_AT)
(SDLK_PLUS, NKCODE_PLUS)
@ -107,5 +108,11 @@ static const std::map<int, int> KeyMapRawSDLtoNative = InitConstMap<int, int>
(SDLK_LEFT, NKCODE_DPAD_LEFT)
(SDLK_UP, NKCODE_DPAD_UP)
(SDLK_RIGHT, NKCODE_DPAD_RIGHT)
(SDLK_DOWN, NKCODE_DPAD_DOWN);
(SDLK_DOWN, NKCODE_DPAD_DOWN)
(SDLK_PAUSE, NKCODE_BREAK)
(SDL_SCANCODE_COPY, NKCODE_EXT_PIPE)
(SDL_SCANCODE_CUT, NKCODE_LEFTBRACE)
(SDL_SCANCODE_PASTE, NKCODE_RIGHTBRACE)
(SDL_SCANCODE_KP_D, NKCODE_START_QUESTION)
(SDLK_APPLICATION, NKCODE_MENU);

View File

@ -228,6 +228,12 @@ typedef enum _keycode_t {
NKCODE_KANA = 218,
NKCODE_ASSIST = 219,
// Extended keycodes on latam kayboards.
NKCODE_START_QUESTION = 220,
NKCODE_LEFTBRACE = 221,
NKCODE_RIGHTBRACE = 222,
// Ouya buttons. Just here for reference, they map straight to regular android buttons
// and will be mapped the same way.
NKCODE_OUYA_BUTTON_A = 97,