diff --git a/Common/KeyMap.cpp b/Common/KeyMap.cpp index 3f088fbe6..6e3ee7953 100644 --- a/Common/KeyMap.cpp +++ b/Common/KeyMap.cpp @@ -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[] = { diff --git a/ext/native/base/NKCodeFromSDL.h b/ext/native/base/NKCodeFromSDL.h index 62cb8cd6d..566d3dd3b 100644 --- a/ext/native/base/NKCodeFromSDL.h +++ b/ext/native/base/NKCodeFromSDL.h @@ -5,6 +5,7 @@ // TODO: Add any missing keys static const std::map KeyMapRawSDLtoNative = InitConstMap + (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 KeyMapRawSDLtoNative = InitConstMap (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 KeyMapRawSDLtoNative = InitConstMap (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); diff --git a/ext/native/input/keycodes.h b/ext/native/input/keycodes.h index 22c9b417a..2694bdd42 100644 --- a/ext/native/input/keycodes.h +++ b/ext/native/input/keycodes.h @@ -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,