diff options
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/linuxmoto/hardwarekeys.cpp | 22 | ||||
-rw-r--r-- | backends/platform/linuxmoto/linuxmoto-events.cpp | 67 |
2 files changed, 71 insertions, 18 deletions
diff --git a/backends/platform/linuxmoto/hardwarekeys.cpp b/backends/platform/linuxmoto/hardwarekeys.cpp index e65d2bec2b..afd89495f9 100644 --- a/backends/platform/linuxmoto/hardwarekeys.cpp +++ b/backends/platform/linuxmoto/hardwarekeys.cpp @@ -48,7 +48,25 @@ static const Key keys[] = { { "CALL", KEYCODE_SPACE, ASCII_SPACE, "Call", kActionKeyType, false }, { "PLUS", KEYCODE_PLUS, '+', "+", kActionKeyType, false }, { "MINUS", KEYCODE_MINUS, '-', "-", kActionKeyType, false }, - +#ifdef MOTOMAGX + {"BACKSPACE", KEYCODE_BACKSPACE, ASCII_BACKSPACE, "Backspace", kActionKeyType, false}, + {"TAB", KEYCODE_TAB, ASCII_TAB, "Tab", kActionKeyType, false}, + {"HASH", KEYCODE_HASH, '#', "#", kActionKeyType, false}, + {"ASTERISK", KEYCODE_ASTERISK, '*', "*", kActionKeyType, false}, + {"LEFTSOFT", KEYCODE_F9, ASCII_F9, "LeftSoft", kActionKeyType, false}, + {"RIGHTSOFT", KEYCODE_F11, ASCII_F11, "RightSoft", kActionKeyType, false}, + {"0", KEYCODE_0, '0', "0", kActionKeyType, false}, + {"1", KEYCODE_1, '1', "1", kActionKeyType, false}, + {"2", KEYCODE_2, '2', "2", kActionKeyType, false}, + {"3", KEYCODE_3, '3', "3", kActionKeyType, false}, + {"4", KEYCODE_4, '4', "4", kActionKeyType, false}, + {"5", KEYCODE_5, '5', "5", kActionKeyType, false}, + {"6", KEYCODE_6, '6', "6", kActionKeyType, false}, + {"7", KEYCODE_7, '7', "7", kActionKeyType, false}, + {"8", KEYCODE_8, '8', "8", kActionKeyType, false}, + {"9", KEYCODE_9, '9', "9", kActionKeyType, false}, +#endif +#ifdef MOTOEZX { "a", KEYCODE_a, 'a', "a", kActionKeyType, true }, { "b", KEYCODE_b, 'b', "b", kActionKeyType, true }, { "c", KEYCODE_c, 'c', "c", kActionKeyType, true }, @@ -59,7 +77,7 @@ static const Key keys[] = { { "h", KEYCODE_h, 'h', "h", kActionKeyType, true }, { "i", KEYCODE_i, 'i', "i", kActionKeyType, true }, { "j", KEYCODE_j, 'j', "j", kActionKeyType, true }, - +#endif // Numeric keypad // Arrows + Home/End pad diff --git a/backends/platform/linuxmoto/linuxmoto-events.cpp b/backends/platform/linuxmoto/linuxmoto-events.cpp index be5eec5c7e..88f95d34bf 100644 --- a/backends/platform/linuxmoto/linuxmoto-events.cpp +++ b/backends/platform/linuxmoto/linuxmoto-events.cpp @@ -60,14 +60,38 @@ bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) { else if (ev.key.keysym.sym == SDLK_SPACE) { ev.key.keysym.sym = SDLK_F5; } - // Camera to VirtualKeyboard + // VirtualKeyboard - Camera key else if (ev.key.keysym.sym == SDLK_PAUSE) { ev.key.keysym.sym = SDLK_F7; } - // mod+fire to enter + // Enter - mod+fire key else if (ev.key.keysym.sym == SDLK_b) { ev.key.keysym.sym = SDLK_RETURN; } + // '3' - mod+up key + else if (ev.key.keysym.sym == SDLK_j) { + ev.key.keysym.sym = SDLK_3; + } + // '6' - mod+up key + else if (ev.key.keysym.sym == SDLK_i) { + ev.key.keysym.sym = SDLK_6; + } + // 'y' - mod+right key + else if (ev.key.keysym.sym == SDLK_g) { + ev.key.keysym.sym = SDLK_y; + } + // 'n' - mod+right key + else if (ev.key.keysym.sym == SDLK_h) { + ev.key.keysym.sym = SDLK_n; + } + // mod+vol'+' -> volume'+' + else if (ev.key.keysym.sym == SDLK_c) { + ev.key.keysym.sym = SDLK_RIGHTBRACKET; + } + // mod+vol'-' -> volume'-' + else if (ev.key.keysym.sym == SDLK_d) { + ev.key.keysym.sym = SDLK_LEFTBRACKET; + } #endif // Motorola Z6/V8 remapkey by Ant-On #ifdef MOTOMAGX @@ -75,21 +99,35 @@ bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) { if (ev.key.keysym.sym == SDLK_ESCAPE) { event.type = Common::EVENT_QUIT; return true; - } else - // F5 Game Menu - Call key + } + // F5 Game Menu - Slide Select if (ev.key.keysym.sym == SDLK_SPACE) { ev.key.keysym.sym = SDLK_F5; } - // 'y' - Mod+Right key + // Escape - Dial key + else if (ev.key.keysym.sym == SDLK_TAB) { + ev.key.keysym.sym = SDLK_ESCAPE; + } + // Space - Virtual keyboard + else if (ev.key.keysym.sym == SDLK_PAUSE) { + ev.key.keysym.sym = SDLK_F7; + } // 'y' - Left soft else if (ev.key.keysym.sym == SDLK_F9) { ev.key.keysym.sym = SDLK_y; } - // 'n' - Mod+Left key - // 'n' - rigth soft + // 'n' - Rigth soft else if (ev.key.keysym.sym == SDLK_F11) { ev.key.keysym.sym = SDLK_n; } + // # -> volume'+' + else if (ev.key.keysym.sym == SDLK_HASH) { + ev.key.keysym.sym = SDLK_RIGHTBRACKET; + } + // * -> volume'-' + else if (ev.key.keysym.sym == SDLK_WORLD_55) { + ev.key.keysym.sym = SDLK_LEFTBRACKET; + } #endif // Joystick to Mouse @@ -144,9 +182,8 @@ bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) { fillMouseEvent(event, _km.x, _km.y); return true; - } else if (ev.key.keysym.sym == SDLK_RETURN) { // Joystick center to pressing Left Mouse - // _km.y_vel = 0; - // _km.y_down_count = 0; + } else if (ev.key.keysym.sym == SDLK_RETURN) { + // Joystick center to pressing Left Mouse if (ev.key.type == SDL_KEYDOWN) { event.type = Common::EVENT_LBUTTONDOWN; } else { @@ -156,9 +193,8 @@ bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) { fillMouseEvent(event, _km.x, _km.y); return true; - } else if (ev.key.keysym.sym == SDLK_PLUS) { // Volume Up to pressing Right Mouse - // _km.y_vel = 0; - // _km.y_down_count = 0; + } else if (ev.key.keysym.sym == SDLK_PLUS) { + // Volume Up to pressing Right Mouse if (ev.key.type == SDL_KEYDOWN ) { event.type = Common::EVENT_RBUTTONDOWN; } else { @@ -167,9 +203,8 @@ bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) { fillMouseEvent(event, _km.x, _km.y); return true; - } else if (ev.key.keysym.sym == SDLK_MINUS) { // Volume Down to pressing Left Mouse - //_km.y_vel = 0; - //_km.y_down_count = 0; + } else if (ev.key.keysym.sym == SDLK_MINUS) { + // Volume Down to pressing Left Mouse if (ev.key.type == SDL_KEYDOWN) { event.type = Common::EVENT_LBUTTONDOWN; } else { |