mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-12-11 23:53:55 +00:00
101 lines
3.2 KiB
C++
101 lines
3.2 KiB
C++
#include <map>
|
|
#include "util/const_map.h"
|
|
|
|
static const std::map<int, int> KeyMapPadBlackberrytoNative = InitConstMap<int, int>
|
|
(SCREEN_A_GAME_BUTTON, NKCODE_BUTTON_A)
|
|
(SCREEN_B_GAME_BUTTON, NKCODE_BUTTON_B)
|
|
(SCREEN_C_GAME_BUTTON, NKCODE_BUTTON_C)
|
|
(SCREEN_X_GAME_BUTTON, NKCODE_BUTTON_X)
|
|
(SCREEN_Y_GAME_BUTTON, NKCODE_BUTTON_Y)
|
|
(SCREEN_Z_GAME_BUTTON, NKCODE_BUTTON_Z)
|
|
(SCREEN_MENU1_GAME_BUTTON, NKCODE_BUTTON_START)
|
|
(SCREEN_MENU2_GAME_BUTTON, NKCODE_BUTTON_SELECT)
|
|
(SCREEN_MENU3_GAME_BUTTON, NKCODE_MENU)
|
|
(SCREEN_MENU4_GAME_BUTTON, NKCODE_ESCAPE)
|
|
(SCREEN_L1_GAME_BUTTON, NKCODE_BUTTON_L1)
|
|
(SCREEN_L2_GAME_BUTTON, NKCODE_BUTTON_L2)
|
|
(SCREEN_L3_GAME_BUTTON, NKCODE_OUYA_BUTTON_L3)
|
|
(SCREEN_R1_GAME_BUTTON, NKCODE_BUTTON_R1)
|
|
(SCREEN_R2_GAME_BUTTON, NKCODE_BUTTON_R2)
|
|
(SCREEN_R3_GAME_BUTTON, NKCODE_OUYA_BUTTON_R3)
|
|
(SCREEN_DPAD_UP_GAME_BUTTON, NKCODE_DPAD_UP)
|
|
(SCREEN_DPAD_DOWN_GAME_BUTTON, NKCODE_DPAD_DOWN)
|
|
(SCREEN_DPAD_LEFT_GAME_BUTTON, NKCODE_DPAD_LEFT)
|
|
(SCREEN_DPAD_RIGHT_GAME_BUTTON, NKCODE_DPAD_RIGHT);
|
|
|
|
// TODO: Add any missing keys
|
|
static const std::map<int, int> KeyMapRawBlackberrytoNative = InitConstMap<int, int>
|
|
(KEYCODE_P, NKCODE_P)
|
|
(KEYCODE_O, NKCODE_O)
|
|
(KEYCODE_I, NKCODE_I)
|
|
(KEYCODE_U, NKCODE_U)
|
|
(KEYCODE_Y, NKCODE_Y)
|
|
(KEYCODE_T, NKCODE_T)
|
|
(KEYCODE_R, NKCODE_R)
|
|
(KEYCODE_E, NKCODE_E)
|
|
(KEYCODE_W, NKCODE_W)
|
|
(KEYCODE_Q, NKCODE_Q)
|
|
(KEYCODE_L, NKCODE_L)
|
|
(KEYCODE_K, NKCODE_K)
|
|
(KEYCODE_J, NKCODE_J)
|
|
(KEYCODE_H, NKCODE_H)
|
|
(KEYCODE_G, NKCODE_G)
|
|
(KEYCODE_F, NKCODE_F)
|
|
(KEYCODE_D, NKCODE_D)
|
|
(KEYCODE_S, NKCODE_S)
|
|
(KEYCODE_A, NKCODE_A)
|
|
(KEYCODE_M, NKCODE_M)
|
|
(KEYCODE_N, NKCODE_N)
|
|
(KEYCODE_B, NKCODE_B)
|
|
(KEYCODE_V, NKCODE_V)
|
|
(KEYCODE_C, NKCODE_C)
|
|
(KEYCODE_X, NKCODE_X)
|
|
(KEYCODE_Z, NKCODE_Z)
|
|
(KEYCODE_COMMA, NKCODE_COMMA)
|
|
(KEYCODE_PERIOD, NKCODE_PERIOD)
|
|
(KEYCODE_LEFT_ALT, NKCODE_ALT_LEFT)
|
|
(KEYCODE_RIGHT_ALT, NKCODE_ALT_RIGHT)
|
|
(KEYCODE_LEFT_SHIFT, NKCODE_SHIFT_LEFT)
|
|
(KEYCODE_RIGHT_SHIFT, NKCODE_SHIFT_RIGHT)
|
|
(KEYCODE_TAB, NKCODE_TAB)
|
|
(KEYCODE_SPACE, NKCODE_SPACE)
|
|
(KEYCODE_RETURN, NKCODE_ENTER)
|
|
(KEYCODE_MINUS, NKCODE_MINUS)
|
|
(KEYCODE_EQUAL, NKCODE_EQUALS)
|
|
(KEYCODE_LEFT_BRACKET, NKCODE_LEFT_BRACKET)
|
|
(KEYCODE_RIGHT_BRACKET, NKCODE_RIGHT_BRACKET)
|
|
(KEYCODE_BACK_SLASH, NKCODE_BACKSLASH)
|
|
(KEYCODE_SEMICOLON, NKCODE_SEMICOLON)
|
|
(KEYCODE_APOSTROPHE, NKCODE_APOSTROPHE)
|
|
(KEYCODE_SLASH, NKCODE_SLASH)
|
|
(KEYCODE_AT, NKCODE_AT)
|
|
(KEYCODE_PLUS, NKCODE_PLUS)
|
|
(KEYCODE_ESCAPE, NKCODE_ESCAPE)
|
|
(KEYCODE_DELETE, NKCODE_FORWARD_DEL)
|
|
(KEYCODE_LEFT_CTRL, NKCODE_CTRL_LEFT)
|
|
(KEYCODE_RIGHT_CTRL, NKCODE_CTRL_RIGHT)
|
|
(KEYCODE_CAPS_LOCK, NKCODE_CAPS_LOCK)
|
|
(KEYCODE_HOME, NKCODE_MOVE_HOME)
|
|
(KEYCODE_END, NKCODE_MOVE_END)
|
|
(KEYCODE_INSERT, NKCODE_INSERT)
|
|
(KEYCODE_ZERO, NKCODE_0)
|
|
(KEYCODE_ONE, NKCODE_1)
|
|
(KEYCODE_TWO, NKCODE_2)
|
|
(KEYCODE_THREE, NKCODE_3)
|
|
(KEYCODE_FOUR, NKCODE_4)
|
|
(KEYCODE_FIVE, NKCODE_5)
|
|
(KEYCODE_SIX, NKCODE_6)
|
|
(KEYCODE_SEVEN, NKCODE_7)
|
|
(KEYCODE_EIGHT, NKCODE_8)
|
|
(KEYCODE_NINE, NKCODE_9)
|
|
(KEYCODE_KP_DIVIDE, NKCODE_NUMPAD_DIVIDE)
|
|
(KEYCODE_KP_MULTIPLY, NKCODE_NUMPAD_MULTIPLY)
|
|
(KEYCODE_KP_MINUS, NKCODE_NUMPAD_SUBTRACT)
|
|
(KEYCODE_KP_PLUS, NKCODE_NUMPAD_ADD)
|
|
(KEYCODE_KP_ENTER, NKCODE_NUMPAD_ENTER)
|
|
(KEYCODE_LEFT, NKCODE_DPAD_LEFT)
|
|
(KEYCODE_UP, NKCODE_DPAD_UP)
|
|
(KEYCODE_RIGHT, NKCODE_DPAD_RIGHT)
|
|
(KEYCODE_DOWN, NKCODE_DPAD_DOWN);
|
|
|