diff options
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/PalmOS/Src/base_event.cpp | 42 | ||||
-rw-r--r-- | backends/platform/PalmOS/Src/zodiac_event.cpp | 4 | ||||
-rw-r--r-- | backends/platform/dc/input.cpp | 16 | ||||
-rw-r--r-- | backends/platform/dc/selector.cpp | 2 | ||||
-rw-r--r-- | backends/platform/dc/softkbd.cpp | 4 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/dsmain.cpp | 10 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/dsoptions.cpp | 4 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/touchkeyboard.cpp | 46 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/touchkeyboard.h | 69 | ||||
-rw-r--r-- | backends/platform/gp2x/events.cpp | 32 | ||||
-rw-r--r-- | backends/platform/gp32/gp32_osys.cpp | 12 | ||||
-rw-r--r-- | backends/platform/morphos/morphos.cpp | 2 | ||||
-rw-r--r-- | backends/platform/ps2/ps2input.cpp | 239 | ||||
-rw-r--r-- | backends/platform/ps2/sdlkeys.h | 264 | ||||
-rw-r--r-- | backends/platform/psp/osys_psp.cpp | 12 | ||||
-rw-r--r-- | backends/platform/psp/osys_psp_gu.cpp | 28 | ||||
-rw-r--r-- | backends/platform/sdl/events.cpp | 12 | ||||
-rw-r--r-- | backends/platform/wince/CEActionsSmartphone.cpp | 10 |
18 files changed, 239 insertions, 569 deletions
diff --git a/backends/platform/PalmOS/Src/base_event.cpp b/backends/platform/PalmOS/Src/base_event.cpp index c2220d56a1..620195deeb 100644 --- a/backends/platform/PalmOS/Src/base_event.cpp +++ b/backends/platform/PalmOS/Src/base_event.cpp @@ -104,7 +104,7 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { _keyExtraPressed &= ~_keyExtra.bitLeft; event.type = Common::EVENT_KEYUP; - event.kbd.keycode = 276; + event.kbd.keycode = Common::KEYCODE_LEFT; event.kbd.ascii = event.kbd.keycode; event.kbd.flags = 0; return true; @@ -115,7 +115,7 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { _keyExtraPressed &= ~_keyExtra.bitRight; event.type = Common::EVENT_KEYUP; - event.kbd.keycode = 275; + event.kbd.keycode = Common::KEYCODE_RIGHT; event.kbd.ascii = event.kbd.keycode; event.kbd.flags = 0; return true; @@ -126,7 +126,7 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { _keyExtraPressed &= ~_keyExtra.bitUp; event.type = Common::EVENT_KEYUP; - event.kbd.keycode = 273; + event.kbd.keycode = Common::KEYCODE_UP; event.kbd.ascii = event.kbd.keycode; event.kbd.flags = 0; return true; @@ -137,7 +137,7 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { _keyExtraPressed &= ~_keyExtra.bitDown; event.type = Common::EVENT_KEYUP; - event.kbd.keycode = 274; + event.kbd.keycode = Common::KEYCODE_DOWN; event.kbd.ascii = event.kbd.keycode; event.kbd.flags = 0; return true; @@ -180,19 +180,19 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { if (gVars->arrowKeys) { if (keyCurrentState & _keyExtra.bitLeft) { _keyExtraPressed |= _keyExtra.bitLeft; - event.kbd.keycode = 276; + event.kbd.keycode = Common::KEYCODE_LEFT; } else if (keyCurrentState & _keyExtra.bitRight) { _keyExtraPressed |= _keyExtra.bitRight; - event.kbd.keycode = 275; + event.kbd.keycode = Common::KEYCODE_RIGHT; } else if (keyCurrentState & _keyExtra.bitUp) { _keyExtraPressed |= _keyExtra.bitUp; - event.kbd.keycode = 273; + event.kbd.keycode = Common::EVENT_KEYUP; } else if (keyCurrentState & _keyExtra.bitDown) { _keyExtraPressed |= _keyExtra.bitDown; - event.kbd.keycode = 274; + event.kbd.keycode = Common::KEYCODE_DOWN; } event.type = Common::EVENT_KEYDOWN; @@ -238,13 +238,13 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { // arrow keys case chrUpArrow: - k = 273; break; + k = Common::KEYCODE_UP; break; case chrDownArrow: - k = 274; break; + k = Common::KEYCODE_DOWN; break; case chrRightArrow: - k = 275; break; + k = Common::KEYCODE_RIGHT; break; case chrLeftArrow: - k = 276; break; + k = Common::KEYCODE_LEFT; break; } if (k) { @@ -261,16 +261,16 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { // ESC key case vchrLaunch: event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = 27; - event.kbd.ascii = 27; + event.kbd.keycode = Common::KEYCODE_ESCAPE; + event.kbd.ascii = Common::KEYCODE_ESCAPE; event.kbd.flags = 0; return true; // F5 = menu case vchrMenu: event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = 319; - event.kbd.ascii = 319; + event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be changed to KEYCODE_F5 + event.kbd.ascii = Common::ASCII_F5; event.kbd.flags = 0; return true; @@ -286,13 +286,13 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { // arrow keys case chrUpArrow: - k = 273; break; + k = Common::KEYCODE_UP; break; case chrDownArrow: - k = 274; break; + k = Common::KEYCODE_DOWN; break; case chrRightArrow: - k = 275; break; + k = Common::KEYCODE_RIGHT; break; case chrLeftArrow: - k = 276; break; + k = Common::KEYCODE_LEFT; break; } if (k) { @@ -411,7 +411,7 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) { // F1 -> F10 key if (key >= '0' && key <= '9' && mask == (Common::KBD_CTRL|Common::KBD_ALT)) { - key = (key == '0') ? 324 : (315 + key - '1'); + key = (key == '0') ? 324 : (Common::ASCII_F1 + key - '1'); mask = 0; #ifdef STDLIB_TRACE_MEMORY diff --git a/backends/platform/PalmOS/Src/zodiac_event.cpp b/backends/platform/PalmOS/Src/zodiac_event.cpp index 4962ad2b72..3ee2a32654 100644 --- a/backends/platform/PalmOS/Src/zodiac_event.cpp +++ b/backends/platform/PalmOS/Src/zodiac_event.cpp @@ -46,8 +46,8 @@ bool OSystem_PalmZodiac::check_event(Common::Event &event, EventPtr ev) { // F5 = menu case vchrThumbWheelBack: event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = 319; - event.kbd.ascii = 319; + event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be KEYCODE_F5 + event.kbd.ascii = Common::ASCII_F5; event.kbd.flags = 0; return true; diff --git a/backends/platform/dc/input.cpp b/backends/platform/dc/input.cpp index 7a5e5911d8..f3638a28db 100644 --- a/backends/platform/dc/input.cpp +++ b/backends/platform/dc/input.cpp @@ -48,7 +48,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y, if(!(buttons & 4)) lmb++; if(!(buttons & 2)) rmb++; - if(!(buttons & 8)) newkey = 319; + if(!(buttons & 8)) newkey = Common::ASCII_F5; else if(!(buttons & 512)) newkey = ' '; else if(!(buttons & 1024)) newkey = numpadmap[(buttons>>4)&15]; @@ -69,7 +69,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y, if(!(buttons & 4)) lmb++; if(!(buttons & 2)) rmb++; - if(!(buttons & 8)) newkey = 319; + if(!(buttons & 8)) newkey = Common::ASCII_F5; mouse_x += pad->cond.mouse.axis1; mouse_y += pad->cond.mouse.axis2; @@ -101,22 +101,22 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y, "=¯`{ }+*½<>?" : "-^@[ ];:§,./")[key - 0x2d]; else if(key >= 0x3a && key <= 0x43) - newkey = key+(315-0x3a); + newkey = key+(Common::ASCII_F1-0x3a); else if(key >= 0x54 && key <= 0x57) newkey = "/*-+"[key-0x54]; else switch(key) { case 0x27: case 0x62: newkey = ((shift & 0x22)? '~' : '0'); break; case 0x28: case 0x58: - newkey = 13; break; + newkey = Common::KEYCODE_RETURN; break; case 0x29: - newkey = 27; break; + newkey = Common::KEYCODE_ESCAPE; break; case 0x2a: - newkey = 8; break; + newkey = Common::KEYCODE_BACKSPACE; break; case 0x2b: - newkey = 9; break; + newkey = Common::KEYCODE_TAB; break; case 0x2c: - newkey = ' '; break; + newkey = Common::KEYCODE_SPACE; break; case 0x4c: if((shift & 0x11) && (shift & 0x44)) exit(0); diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp index a4fec642fe..8262a39614 100644 --- a/backends/platform/dc/selector.cpp +++ b/backends/platform/dc/selector.cpp @@ -364,7 +364,7 @@ int gameMenu(Game *games, int num_games) event = handleInput(locked_get_pads(), mousex, mousey, shiftFlags); setimask(mask); - if(event==-Common::EVENT_LBUTTONDOWN || event==13 || event==319) { + if(event==-Common::EVENT_LBUTTONDOWN || event==13 || event==Common::ASCII_F5) { int selected_game = top_game + selector_pos; for(int fade=0; fade<=256; fade+=4) { diff --git a/backends/platform/dc/softkbd.cpp b/backends/platform/dc/softkbd.cpp index e8436fc30a..58b492f6db 100644 --- a/backends/platform/dc/softkbd.cpp +++ b/backends/platform/dc/softkbd.cpp @@ -52,7 +52,7 @@ static const char key_names[] = static const short key_codes[] = { - 27, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + Common::KEYCODE_ESCAPE, Common::ASCII_F1, Common::ASCII_F2, Common::ASCII_F3, Common::ASCII_F4, Common::ASCII_F5, Common::ASCII_F6, Common::ASCII_F7, Common::ASCII_F8, Common::ASCII_F9, Common::ASCII_F10, K('1','!'), K('2','"'), K('3','#'), K('4','$'), K('5','%'), K('6','&'), K('7','\''), K('8','('), K('9',')'), K('0','~'), K('-','='), K('q','Q'), K('w','W'), K('e','E'), K('r','R'), K('t','T'), @@ -61,7 +61,7 @@ static const short key_codes[] = K('h','H'), K('j','J'), K('k','K'), K('l','L'), K(';','+'), K(':','*'), K('z','Z'), K('x','X'), K('c','C'), K('v','V'), K('b','B'), K('n','N'), K('m','M'), K(',','<'), K('.','>'), K('/','?'), K('\\','_'), - ~Common::KBD_SHIFT, ~Common::KBD_CTRL, ~Common::KBD_ALT, ' ', 8, 13 + ~Common::KBD_SHIFT, ~Common::KBD_CTRL, ~Common::KBD_ALT, ' ', Common::KEYCODE_BACKSPACE, Common::KEYCODE_RETURN }; SoftKeyboard::SoftKeyboard(const OSystem_Dreamcast *_os) diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index becb0205cb..be5d0a14a2 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -1226,7 +1226,7 @@ void addEventsToQueue() { if (leftHandedSwap(getKeysChanged()) & KEY_UP) { event.type = getKeyEvent(leftHandedSwap(KEY_UP)); - event.kbd.keycode = SDLK_UP; + event.kbd.keycode = Common::KEYCODE_UP; event.kbd.ascii = 0; event.kbd.flags = 0; system->addEvent(event); @@ -1234,7 +1234,7 @@ void addEventsToQueue() { if (leftHandedSwap(getKeysChanged()) & KEY_DOWN) { event.type = getKeyEvent(leftHandedSwap(KEY_DOWN)); - event.kbd.keycode = SDLK_DOWN; + event.kbd.keycode = Common::KEYCODE_DOWN; event.kbd.ascii = 0; event.kbd.flags = 0; system->addEvent(event); @@ -1242,7 +1242,7 @@ void addEventsToQueue() { if (leftHandedSwap(getKeysDown()) & KEY_A) { event.type = getKeyEvent(leftHandedSwap(KEY_A)); - event.kbd.keycode = SDLK_RETURN; + event.kbd.keycode = Common::KEYCODE_RETURN; event.kbd.ascii = 0; event.kbd.flags = 0; system->addEvent(event); @@ -1253,8 +1253,8 @@ void addEventsToQueue() { if ((getKeysChanged() & KEY_START)) { event.type = getKeyEvent(KEY_START); - event.kbd.keycode = 319; // F5 - event.kbd.ascii = 319; + event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be KEYCODE_F5 + event.kbd.ascii = Common::ASCII_F5; event.kbd.flags = 0; system->addEvent(event); } diff --git a/backends/platform/ds/arm9/source/dsoptions.cpp b/backends/platform/ds/arm9/source/dsoptions.cpp index 58df3dc863..171d1e044c 100644 --- a/backends/platform/ds/arm9/source/dsoptions.cpp +++ b/backends/platform/ds/arm9/source/dsoptions.cpp @@ -158,8 +158,8 @@ void DSOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint Common::Event event; event.type = Common::EVENT_KEYDOWN; - event.kbd.ascii = SDLK_DOWN; - event.kbd.keycode = SDLK_DOWN; + event.kbd.ascii = 0; + event.kbd.keycode = Common::KEYCODE_DOWN; OSystem_DS::instance()->addEvent(event); event.type = Common::EVENT_KEYUP; diff --git a/backends/platform/ds/arm9/source/touchkeyboard.cpp b/backends/platform/ds/arm9/source/touchkeyboard.cpp index 3f1d6f8064..88e78f165c 100644 --- a/backends/platform/ds/arm9/source/touchkeyboard.cpp +++ b/backends/platform/ds/arm9/source/touchkeyboard.cpp @@ -56,9 +56,9 @@ key_data keys[DS_NUM_KEYS] = { {35, 17, 0, '8'}, {36, 19, 0, '9'}, {27, 21, 0, '0'}, - {45, 23, 0, SDLK_MINUS}, - {50, 25, 0, SDLK_EQUALS}, - {52, 27, 0, SDLK_BACKSPACE}, + {45, 23, 0, Common::KEYCODE_MINUS}, + {50, 25, 0, Common::KEYCODE_EQUALS}, + {52, 27, 0, Common::KEYCODE_BACKSPACE}, // Top row {'Q'-'A' + 1, 4, 2, 'Q'}, @@ -71,8 +71,8 @@ key_data keys[DS_NUM_KEYS] = { {'I'-'A' + 1, 18, 2, 'I'}, {'O'-'A' + 1, 20, 2, 'O'}, {'P'-'A' + 1, 22, 2, 'P'}, - {43, 24, 2, SDLK_LEFTBRACKET}, - {44, 26, 2, SDLK_RIGHTBRACKET}, + {43, 24, 2, Common::KEYCODE_LEFTBRACKET}, + {44, 26, 2, Common::KEYCODE_RIGHTBRACKET}, // Middle row {55, 3, 4, DS_CAPSLOCK}, @@ -85,9 +85,9 @@ key_data keys[DS_NUM_KEYS] = { {'J'-'A' + 1, 17, 4, 'J'}, {'K'-'A' + 1, 19, 4, 'K'}, {'L'-'A' + 1, 21, 4, 'L'}, - {42, 23, 4, SDLK_SEMICOLON}, - {41, 25, 4, SDLK_QUOTE}, - {46, 27, 4, SDLK_RETURN}, + {42, 23, 4, Common::KEYCODE_SEMICOLON}, + {41, 25, 4, Common::KEYCODE_QUOTE}, + {46, 27, 4, Common::KEYCODE_RETURN}, // Bottom row {51, 4, 6, DS_SHIFT}, @@ -98,26 +98,26 @@ key_data keys[DS_NUM_KEYS] = { {'B'-'A' + 1, 14, 6, 'B'}, {'N'-'A' + 1, 16, 6, 'N'}, {'M'-'A' + 1, 18, 6, 'M'}, - {38, 20, 6, SDLK_COMMA}, - {39, 22, 6, SDLK_PERIOD}, - {40, 24, 6, SDLK_SLASH}, + {38, 20, 6, Common::KEYCODE_COMMA}, + {39, 22, 6, Common::KEYCODE_PERIOD}, + {40, 24, 6, Common::KEYCODE_SLASH}, // Space bar - {47, 9, 8, SDLK_SPACE}, - {48, 11, 8, SDLK_SPACE}, - {48, 13, 8, SDLK_SPACE}, - {48, 15, 8, SDLK_SPACE}, - {48, 17, 8, SDLK_SPACE}, - {49, 19, 8, SDLK_SPACE}, + {47, 9, 8, Common::KEYCODE_SPACE}, + {48, 11, 8, Common::KEYCODE_SPACE}, + {48, 13, 8, Common::KEYCODE_SPACE}, + {48, 15, 8, Common::KEYCODE_SPACE}, + {48, 17, 8, Common::KEYCODE_SPACE}, + {49, 19, 8, Common::KEYCODE_SPACE}, // Cursor arrows - {52, 27, 8, SDLK_LEFT}, - {54, 29, 8, SDLK_DOWN}, - {53, 31, 8, SDLK_RIGHT}, - {51, 29, 6, SDLK_UP}, + {52, 27, 8, Common::KEYCODE_LEFT}, + {54, 29, 8, Common::KEYCODE_DOWN}, + {53, 31, 8, Common::KEYCODE_RIGHT}, + {51, 29, 6, Common::KEYCODE_UP}, // Close button - {56, 30, 0, SDLK_UNKNOWN}, + {56, 30, 0, 0}, }; @@ -237,7 +237,7 @@ void addKeyboardEvents() { Common::Event event; // consolePrintf("Key: %d\n", r); - if ((keys[r].character == SDLK_UNKNOWN)) { + if ((keys[r].character == 0)) { // Close button DS::closed = true; } else if ((keys[r].character >= '0') && (keys[r].character <= '9')) { diff --git a/backends/platform/ds/arm9/source/touchkeyboard.h b/backends/platform/ds/arm9/source/touchkeyboard.h index 53fd25e12a..e8f5fda37e 100644 --- a/backends/platform/ds/arm9/source/touchkeyboard.h +++ b/backends/platform/ds/arm9/source/touchkeyboard.h @@ -25,75 +25,6 @@ namespace DS { -enum SDLKey { - SDLK_UNKNOWN = 0, SDLK_FIRST = 0, SDLK_BACKSPACE = 8, SDLK_TAB = 9, - SDLK_CLEAR = 12, SDLK_RETURN = 13, SDLK_PAUSE = 19, SDLK_ESCAPE = 27, - SDLK_SPACE = 32, SDLK_EXCLAIM = 33, SDLK_QUOTEDBL = 34, SDLK_HASH = 35, - SDLK_DOLLAR = 36, SDLK_AMPERSAND = 38, SDLK_QUOTE = 39, SDLK_LEFTPAREN = 40, - SDLK_RIGHTPAREN = 41, SDLK_ASTERISK = 42, SDLK_PLUS = 43, SDLK_COMMA = 44, - SDLK_MINUS = 45, SDLK_PERIOD = 46, SDLK_SLASH = 47, SDLK_0 = 48, - SDLK_1 = 49, SDLK_2 = 50, SDLK_3 = 51, SDLK_4 = 52, - SDLK_5 = 53, SDLK_6 = 54, SDLK_7 = 55, SDLK_8 = 56, - SDLK_9 = 57, SDLK_COLON = 58, SDLK_SEMICOLON = 59, SDLK_LESS = 60, - SDLK_EQUALS = 61, SDLK_GREATER = 62, SDLK_QUESTION = 63, SDLK_AT = 64, - SDLK_LEFTBRACKET = 91, SDLK_BACKSLASH = 92, SDLK_RIGHTBRACKET = 93, SDLK_CARET = 94, - SDLK_UNDERSCORE = 95, SDLK_BACKQUOTE = 96, SDLK_a = 97, SDLK_b = 98, - SDLK_c = 99, SDLK_d = 100, SDLK_e = 101, SDLK_f = 102, - SDLK_g = 103, SDLK_h = 104, SDLK_i = 105, SDLK_j = 106, - SDLK_k = 107, SDLK_l = 108, SDLK_m = 109, SDLK_n = 110, - SDLK_o = 111, SDLK_p = 112, SDLK_q = 113, SDLK_r = 114, - SDLK_s = 115, SDLK_t = 116, SDLK_u = 117, SDLK_v = 118, - SDLK_w = 119, SDLK_x = 120, SDLK_y = 121, SDLK_z = 122, - SDLK_DELETE = 127, SDLK_WORLD_0 = 160, SDLK_WORLD_1 = 161, SDLK_WORLD_2 = 162, - SDLK_WORLD_3 = 163, SDLK_WORLD_4 = 164, SDLK_WORLD_5 = 165, SDLK_WORLD_6 = 166, - SDLK_WORLD_7 = 167, SDLK_WORLD_8 = 168, SDLK_WORLD_9 = 169, SDLK_WORLD_10 = 170, - SDLK_WORLD_11 = 171, SDLK_WORLD_12 = 172, SDLK_WORLD_13 = 173, SDLK_WORLD_14 = 174, - SDLK_WORLD_15 = 175, SDLK_WORLD_16 = 176, SDLK_WORLD_17 = 177, SDLK_WORLD_18 = 178, - SDLK_WORLD_19 = 179, SDLK_WORLD_20 = 180, SDLK_WORLD_21 = 181, SDLK_WORLD_22 = 182, - SDLK_WORLD_23 = 183, SDLK_WORLD_24 = 184, SDLK_WORLD_25 = 185, SDLK_WORLD_26 = 186, - SDLK_WORLD_27 = 187, SDLK_WORLD_28 = 188, SDLK_WORLD_29 = 189, SDLK_WORLD_30 = 190, - SDLK_WORLD_31 = 191, SDLK_WORLD_32 = 192, SDLK_WORLD_33 = 193, SDLK_WORLD_34 = 194, - SDLK_WORLD_35 = 195, SDLK_WORLD_36 = 196, SDLK_WORLD_37 = 197, SDLK_WORLD_38 = 198, - SDLK_WORLD_39 = 199, SDLK_WORLD_40 = 200, SDLK_WORLD_41 = 201, SDLK_WORLD_42 = 202, - SDLK_WORLD_43 = 203, SDLK_WORLD_44 = 204, SDLK_WORLD_45 = 205, SDLK_WORLD_46 = 206, - SDLK_WORLD_47 = 207, SDLK_WORLD_48 = 208, SDLK_WORLD_49 = 209, SDLK_WORLD_50 = 210, - SDLK_WORLD_51 = 211, SDLK_WORLD_52 = 212, SDLK_WORLD_53 = 213, SDLK_WORLD_54 = 214, - SDLK_WORLD_55 = 215, SDLK_WORLD_56 = 216, SDLK_WORLD_57 = 217, SDLK_WORLD_58 = 218, - SDLK_WORLD_59 = 219, SDLK_WORLD_60 = 220, SDLK_WORLD_61 = 221, SDLK_WORLD_62 = 222, - SDLK_WORLD_63 = 223, SDLK_WORLD_64 = 224, SDLK_WORLD_65 = 225, SDLK_WORLD_66 = 226, - SDLK_WORLD_67 = 227, SDLK_WORLD_68 = 228, SDLK_WORLD_69 = 229, SDLK_WORLD_70 = 230, - SDLK_WORLD_71 = 231, SDLK_WORLD_72 = 232, SDLK_WORLD_73 = 233, SDLK_WORLD_74 = 234, - SDLK_WORLD_75 = 235, SDLK_WORLD_76 = 236, SDLK_WORLD_77 = 237, SDLK_WORLD_78 = 238, - SDLK_WORLD_79 = 239, SDLK_WORLD_80 = 240, SDLK_WORLD_81 = 241, SDLK_WORLD_82 = 242, - SDLK_WORLD_83 = 243, SDLK_WORLD_84 = 244, SDLK_WORLD_85 = 245, SDLK_WORLD_86 = 246, - SDLK_WORLD_87 = 247, SDLK_WORLD_88 = 248, SDLK_WORLD_89 = 249, SDLK_WORLD_90 = 250, - SDLK_WORLD_91 = 251, SDLK_WORLD_92 = 252, SDLK_WORLD_93 = 253, SDLK_WORLD_94 = 254, - SDLK_WORLD_95 = 255, SDLK_KP0 = 256, SDLK_KP1 = 257, SDLK_KP2 = 258, - SDLK_KP3 = 259, SDLK_KP4 = 260, SDLK_KP5 = 261, SDLK_KP6 = 262, - SDLK_KP7 = 263, SDLK_KP8 = 264, SDLK_KP9 = 265, SDLK_KP_PERIOD = 266, - SDLK_KP_DIVIDE = 267, SDLK_KP_MULTIPLY = 268, SDLK_KP_MINUS = 269, SDLK_KP_PLUS = 270, - SDLK_KP_ENTER = 271, SDLK_KP_EQUALS = 272, SDLK_UP = 273, SDLK_DOWN = 274, - SDLK_RIGHT = 275, SDLK_LEFT = 276, SDLK_INSERT = 277, SDLK_HOME = 278, - SDLK_END = 279, SDLK_PAGEUP = 280, SDLK_PAGEDOWN = 281, SDLK_F1 = 282, - SDLK_F2 = 283, SDLK_F3 = 284, SDLK_F4 = 285, SDLK_F5 = 286, - SDLK_F6 = 287, SDLK_F7 = 288, SDLK_F8 = 289, SDLK_F9 = 290, - SDLK_F10 = 291, SDLK_F11 = 292, SDLK_F12 = 293, SDLK_F13 = 294, - SDLK_F14 = 295, SDLK_F15 = 296, SDLK_NUMLOCK = 300, SDLK_CAPSLOCK = 301, - SDLK_SCROLLOCK = 302, SDLK_RSHIFT = 303, SDLK_LSHIFT = 304, SDLK_RCTRL = 305, - SDLK_LCTRL = 306, SDLK_RALT = 307, SDLK_LALT = 308, SDLK_RMETA = 309, - SDLK_LMETA = 310, SDLK_LSUPER = 311, SDLK_RSUPER = 312, SDLK_MODE = 313, - SDLK_COMPOSE = 314, SDLK_HELP = 315, SDLK_PRINT = 316, SDLK_SYSREQ = 317, - SDLK_BREAK = 318, SDLK_MENU = 319, SDLK_POWER = 320, SDLK_EURO = 321, - SDLK_UNDO = 322, SDLK_LAST -}; - -enum SDLMod { - KMOD_NONE = 0x0000, KMOD_LSHIFT = 0x0001, KMOD_RSHIFT = 0x0002, KMOD_LCTRL = 0x0040, - KMOD_RCTRL = 0x0080, KMOD_LALT = 0x0100, KMOD_RALT = 0x0200, KMOD_LMETA = 0x0400, - KMOD_RMETA = 0x0800, KMOD_NUM = 0x1000, KMOD_CAPS = 0x2000, KMOD_MODE = 0x4000, - KMOD_RESERVED = 0x8000 -}; - void drawKeyboard(int tileBase, int mapBase, u16* saveSpace); void restoreVRAM(int tileBase, int mapBase, u16* saveSpace); void addKeyboardEvents(); diff --git a/backends/platform/gp2x/events.cpp b/backends/platform/gp2x/events.cpp index 80cdad924b..72b188afd2 100644 --- a/backends/platform/gp2x/events.cpp +++ b/backends/platform/gp2x/events.cpp @@ -65,7 +65,7 @@ static int mapKey(SDLKey key, SDLMod mod, Uint16 unicode) { if (key >= SDLK_F1 && key <= SDLK_F9) { - return key - SDLK_F1 + 315; + return key - SDLK_F1 + Common::ASCII_F1; } else if (key >= SDLK_KP0 && key <= SDLK_KP9) { return key - SDLK_KP0 + '0'; } else if (key >= SDLK_UP && key <= SDLK_PAGEDOWN) { @@ -468,10 +468,10 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { break; case GP2X_BUTTON_R: if (GP2X_BUTTON_STATE_L == TRUE) { - event.kbd.keycode = SDLK_0; + event.kbd.keycode = Common::KEYCODE_0; event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0); } else { - event.kbd.keycode = SDLK_F5; + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0); } break; @@ -479,28 +479,28 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { if (GP2X_BUTTON_STATE_L == TRUE) { event.type = Common::EVENT_QUIT; } else { - event.kbd.keycode = SDLK_ESCAPE; + event.kbd.keycode = Common::KEYCODE_ESCAPE; event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0); } break; case GP2X_BUTTON_A: - event.kbd.keycode = SDLK_PERIOD; + event.kbd.keycode = Common::KEYCODE_PERIOD; event.kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0); break; case GP2X_BUTTON_Y: if (GP2X_BUTTON_STATE_L == TRUE) { setZoomOnMouse(); } else { - event.kbd.keycode = SDLK_SPACE; + event.kbd.keycode = Common::KEYCODE_SPACE; event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0); } break; case JOY_BUT_RETURN: - event.kbd.keycode = SDLK_RETURN; + event.kbd.keycode = Common::KEYCODE_RETURN; event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0); break; case JOY_BUT_ZERO: - event.kbd.keycode = SDLK_0; + event.kbd.keycode = Common::KEYCODE_0; event.kbd.ascii = mapKey(SDLK_0, ev.key.keysym.mod, 0); break; @@ -514,7 +514,7 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { // displayMessageOnOSD("Left Trigger Pressed"); // break; // } else if ((ev.jbutton.button == GP2X_BUTTON_R) && (ev.jbutton.button != GP2X_BUTTON_L)) { - // event.kbd.keycode = SDLK_F5; + // event.kbd.keycode = Common::KEYCODE_F5; // event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0); // break; // } else { @@ -525,7 +525,7 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { if (GP2X_BUTTON_STATE_L == TRUE) { displayMessageOnOSD("Setting CPU Speed at 230MHz"); GP2X_setCpuspeed(200); - //event.kbd.keycode = SDLK_PLUS; + //event.kbd.keycode = Common::KEYCODE_PLUS; //event.kbd.ascii = mapKey(SDLK_PLUS, ev.key.keysym.mod, 0); } else { GP2X_mixer_move_volume(1); @@ -536,7 +536,7 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { if (GP2X_BUTTON_STATE_L == TRUE) { displayMessageOnOSD("Setting CPU Speed at 60MHz"); GP2X_setCpuspeed(60); - //event.kbd.keycode = SDLK_MINUS; + //event.kbd.keycode = Common::KEYCODE_MINUS; //event.kbd.ascii = mapKey(SDLK_MINUS, ev.key.keysym.mod, 0); } else { GP2X_mixer_move_volume(0); @@ -564,26 +564,26 @@ bool OSystem_GP2X::pollEvent(Common::Event &event) { event.kbd.flags = 0; switch (ev.jbutton.button) { case GP2X_BUTTON_SELECT: - event.kbd.keycode = SDLK_ESCAPE; + event.kbd.keycode = Common::KEYCODE_ESCAPE; event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0); break; case GP2X_BUTTON_A: - event.kbd.keycode = SDLK_PERIOD; + event.kbd.keycode = Common::KEYCODE_PERIOD; event.kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0); break; case GP2X_BUTTON_Y: -// event.kbd.keycode = SDLK_SPACE; +// event.kbd.keycode = Common::KEYCODE_SPACE; // event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0); break; case GP2X_BUTTON_START: - event.kbd.keycode = SDLK_RETURN; + event.kbd.keycode = Common::KEYCODE_RETURN; event.kbd.ascii = mapKey(SDLK_RETURN, ev.key.keysym.mod, 0); break; case GP2X_BUTTON_L: GP2X_BUTTON_STATE_L = FALSE; break; case GP2X_BUTTON_R: - event.kbd.keycode = SDLK_F5; + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0); break; case GP2X_BUTTON_VOLUP: diff --git a/backends/platform/gp32/gp32_osys.cpp b/backends/platform/gp32/gp32_osys.cpp index 1cb5eb2d9f..1f07b0660d 100644 --- a/backends/platform/gp32/gp32_osys.cpp +++ b/backends/platform/gp32/gp32_osys.cpp @@ -528,8 +528,10 @@ bool OSystem_GP32::pollEvent(Common::Event &event) { event.type = Common::EVENT_KEYDOWN; if (_overlayVisible) event.kbd.keycode = event.kbd.ascii = 13; - else - event.kbd.keycode = event.kbd.ascii = 319; + else { + event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be KEYCODE_F5 + event.kbd.ascii = Common::ASCII_F5; + } return true; } if (ev.button == GPC_VK_SELECT) { // SELECT = pause @@ -600,8 +602,10 @@ bool OSystem_GP32::pollEvent(Common::Event &event) { event.type = Common::EVENT_KEYUP; if (_overlayVisible) event.kbd.keycode = event.kbd.ascii = 13; - else - event.kbd.keycode = event.kbd.ascii = 319; + else { + event.kbd.keycode = Common::ASCII_F5; // FIXME: Should be KEYCODE_F5 + event.kbd.ascii = Common::ASCII_F5; + } return true; } if (ev.button == GPC_VK_SELECT) { diff --git a/backends/platform/morphos/morphos.cpp b/backends/platform/morphos/morphos.cpp index 66525a7664..7375ecbe46 100644 --- a/backends/platform/morphos/morphos.cpp +++ b/backends/platform/morphos/morphos.cpp @@ -838,7 +838,7 @@ bool OSystem_MorphOS::pollEvent(Common::Event &event) /* * Function key */ - event.kbd.ascii = (ScummMsg->Code-RAWKEY_F1)+315; + event.kbd.ascii = (ScummMsg->Code-RAWKEY_F1)+Common::ASCII_F1; event.kbd.keycode = 0; } else if (ScummMsg->Code == RAWKEY_F11 || ScummMsg->Code == RAWKEY_F12) diff --git a/backends/platform/ps2/ps2input.cpp b/backends/platform/ps2/ps2input.cpp index a3f4a31e8f..a17d38b80d 100644 --- a/backends/platform/ps2/ps2input.cpp +++ b/backends/platform/ps2/ps2input.cpp @@ -31,7 +31,6 @@ #include "backends/platform/ps2/ps2input.h" #include "backends/platform/ps2/ps2pad.h" #include "backends/platform/ps2/systemps2.h" -#include "backends/platform/ps2/sdlkeys.h" #include "common/events.h" #include "common/system.h" @@ -96,15 +95,15 @@ void Ps2Input::warpTo(uint16 x, uint16 y) { #define PAD_CHECK_TIME 20 int Ps2Input::mapKey(int key, int mod) { // copied from sdl backend - if (key >= SDLK_F1 && key <= SDLK_F9) { - return key - SDLK_F1 + 315; - } else if (key >= SDLK_KP0 && key <= SDLK_KP9) { - return key - SDLK_KP0 + '0'; - } else if (key >= SDLK_UP && key <= SDLK_PAGEDOWN) { + if (key >= Common::KEYCODE_F1 && key <= Common::KEYCODE_F9) { + return key - Common::KEYCODE_F1 + Common::ASCII_F1; + } else if (key >= Common::KEYCODE_KP0 && key <= Common::KEYCODE_KP9) { + return key - Common::KEYCODE_KP0 + '0'; + } else if (key >= Common::KEYCODE_UP && key <= Common::KEYCODE_PAGEDOWN) { return key; } else if (key >= 'a' && key <= 'z' && mod & Common::KBD_SHIFT) { return key & ~0x20; - } else if (key >= SDLK_NUMLOCK && key <= SDLK_EURO) { + } else if (key >= Common::KEYCODE_NUMLOCK && key <= Common::KEYCODE_EURO) { return 0; } return key; @@ -142,17 +141,17 @@ bool Ps2Input::pollEvent(Common::Event *event) { PS2KbdRawKey key; if (PS2KbdReadRaw(&key) == 1) { if (_usbToSdlk[key.key]) { - if ((_usbToSdlk[key.key] == SDLK_LSHIFT) || (_usbToSdlk[key.key] == SDLK_RSHIFT)) { + if ((_usbToSdlk[key.key] == Common::KEYCODE_LSHIFT) || (_usbToSdlk[key.key] == Common::KEYCODE_RSHIFT)) { if (key.state & 1) _keyFlags |= Common::KBD_SHIFT; else _keyFlags &= ~Common::KBD_SHIFT; - } else if ((_usbToSdlk[key.key] == SDLK_LCTRL) || (_usbToSdlk[key.key] == SDLK_RCTRL)) { + } else if ((_usbToSdlk[key.key] == Common::KEYCODE_LCTRL) || (_usbToSdlk[key.key] == Common::KEYCODE_RCTRL)) { if (key.state & 1) _keyFlags |= Common::KBD_CTRL; else _keyFlags &= ~Common::KBD_CTRL; - } else if ((_usbToSdlk[key.key] == SDLK_LALT) || (_usbToSdlk[key.key] == SDLK_RALT)) { + } else if ((_usbToSdlk[key.key] == Common::KEYCODE_LALT) || (_usbToSdlk[key.key] == Common::KEYCODE_RALT)) { if (key.state & 1) _keyFlags |= Common::KBD_ALT; else @@ -256,106 +255,106 @@ const int Ps2Input::_usbToSdlk[0x100] = { /* 01 */ 0, /* 02 */ 0, /* 03 */ 0, - /* 04 */ SDLK_a, - /* 05 */ SDLK_b, - /* 06 */ SDLK_c, - /* 07 */ SDLK_d, - /* 08 */ SDLK_e, - /* 09 */ SDLK_f, - /* 0A */ SDLK_g, - /* 0B */ SDLK_h, - /* 0C */ SDLK_i, - /* 0D */ SDLK_j, - /* 0E */ SDLK_k, - /* 0F */ SDLK_l, - /* 10 */ SDLK_m, - /* 11 */ SDLK_n, - /* 12 */ SDLK_o, - /* 13 */ SDLK_p, - /* 14 */ SDLK_q, - /* 15 */ SDLK_r, - /* 16 */ SDLK_s, - /* 17 */ SDLK_t, - /* 18 */ SDLK_u, - /* 19 */ SDLK_v, - /* 1A */ SDLK_w, - /* 1B */ SDLK_x, - /* 1C */ SDLK_y, - /* 1D */ SDLK_z, - /* 1E */ SDLK_1, - /* 1F */ SDLK_2, - /* 20 */ SDLK_3, - /* 21 */ SDLK_4, - /* 22 */ SDLK_5, - /* 23 */ SDLK_6, - /* 24 */ SDLK_7, - /* 25 */ SDLK_8, - /* 26 */ SDLK_9, - /* 27 */ SDLK_0, - /* 28 */ SDLK_RETURN, - /* 29 */ SDLK_ESCAPE, - /* 2A */ SDLK_BACKSPACE, - /* 2B */ SDLK_TAB, - /* 2C */ SDLK_SPACE, - /* 2D */ SDLK_MINUS, - /* 2E */ SDLK_EQUALS, - /* 2F */ SDLK_LEFTBRACKET, - /* 30 */ SDLK_RIGHTBRACKET, - /* 31 */ SDLK_BACKSLASH, - /* 32 */ SDLK_HASH, - /* 33 */ SDLK_SEMICOLON, - /* 34 */ SDLK_QUOTE, - /* 35 */ SDLK_BACKQUOTE, - /* 36 */ SDLK_COMMA, - /* 37 */ SDLK_PERIOD, - /* 38 */ SDLK_SLASH, - /* 39 */ SDLK_CAPSLOCK, - /* 3A */ SDLK_F1, - /* 3B */ SDLK_F2, - /* 3C */ SDLK_F3, - /* 3D */ SDLK_F4, - /* 3E */ SDLK_F5, - /* 3F */ SDLK_F6, - /* 40 */ SDLK_F7, - /* 41 */ SDLK_F8, - /* 42 */ SDLK_F9, - /* 43 */ SDLK_F10, - /* 44 */ SDLK_F11, - /* 45 */ SDLK_F12, - /* 46 */ SDLK_PRINT, - /* 47 */ SDLK_SCROLLOCK, - /* 48 */ SDLK_PAUSE, - /* 49 */ SDLK_INSERT, - /* 4A */ SDLK_HOME, - /* 4B */ SDLK_PAGEUP, - /* 4C */ SDLK_DELETE, - /* 4D */ SDLK_END, - /* 4E */ SDLK_PAGEDOWN, - /* 4F */ SDLK_RIGHT, - /* 50 */ SDLK_LEFT, - /* 51 */ SDLK_DOWN, - /* 52 */ SDLK_UP, - /* 53 */ SDLK_NUMLOCK, - /* 54 */ SDLK_KP_DIVIDE, - /* 55 */ SDLK_KP_MULTIPLY, - /* 56 */ SDLK_KP_MINUS, - /* 57 */ SDLK_KP_PLUS, - /* 58 */ SDLK_KP_ENTER, - /* 59 */ SDLK_KP1, - /* 5A */ SDLK_KP2, - /* 5B */ SDLK_KP3, - /* 5C */ SDLK_KP4, - /* 5D */ SDLK_KP5, - /* 5E */ SDLK_KP6, - /* 5F */ SDLK_KP7, - /* 60 */ SDLK_KP8, - /* 61 */ SDLK_KP9, - /* 62 */ SDLK_KP0, - /* 63 */ SDLK_KP_PERIOD, + /* 04 */ Common::KEYCODE_a, + /* 05 */ Common::KEYCODE_b, + /* 06 */ Common::KEYCODE_c, + /* 07 */ Common::KEYCODE_d, + /* 08 */ Common::KEYCODE_e, + /* 09 */ Common::KEYCODE_f, + /* 0A */ Common::KEYCODE_g, + /* 0B */ Common::KEYCODE_h, + /* 0C */ Common::KEYCODE_i, + /* 0D */ Common::KEYCODE_j, + /* 0E */ Common::KEYCODE_k, + /* 0F */ Common::KEYCODE_l, + /* 10 */ Common::KEYCODE_m, + /* 11 */ Common::KEYCODE_n, + /* 12 */ Common::KEYCODE_o, + /* 13 */ Common::KEYCODE_p, + /* 14 */ Common::KEYCODE_q, + /* 15 */ Common::KEYCODE_r, + /* 16 */ Common::KEYCODE_s, + /* 17 */ Common::KEYCODE_t, + /* 18 */ Common::KEYCODE_u, + /* 19 */ Common::KEYCODE_v, + /* 1A */ Common::KEYCODE_w, + /* 1B */ Common::KEYCODE_x, + /* 1C */ Common::KEYCODE_y, + /* 1D */ Common::KEYCODE_z, + /* 1E */ Common::KEYCODE_1, + /* 1F */ Common::KEYCODE_2, + /* 20 */ Common::KEYCODE_3, + /* 21 */ Common::KEYCODE_4, + /* 22 */ Common::KEYCODE_5, + /* 23 */ Common::KEYCODE_6, + /* 24 */ Common::KEYCODE_7, + /* 25 */ Common::KEYCODE_8, + /* 26 */ Common::KEYCODE_9, + /* 27 */ Common::KEYCODE_0, + /* 28 */ Common::KEYCODE_RETURN, + /* 29 */ Common::KEYCODE_ESCAPE, + /* 2A */ Common::KEYCODE_BACKSPACE, + /* 2B */ Common::KEYCODE_TAB, + /* 2C */ Common::KEYCODE_SPACE, + /* 2D */ Common::KEYCODE_MINUS, + /* 2E */ Common::KEYCODE_EQUALS, + /* 2F */ Common::KEYCODE_LEFTBRACKET, + /* 30 */ Common::KEYCODE_RIGHTBRACKET, + /* 31 */ Common::KEYCODE_BACKSLASH, + /* 32 */ Common::KEYCODE_HASH, + /* 33 */ Common::KEYCODE_SEMICOLON, + /* 34 */ Common::KEYCODE_QUOTE, + /* 35 */ Common::KEYCODE_BACKQUOTE, + /* 36 */ Common::KEYCODE_COMMA, + /* 37 */ Common::KEYCODE_PERIOD, + /* 38 */ Common::KEYCODE_SLASH, + /* 39 */ Common::KEYCODE_CAPSLOCK, + /* 3A */ Common::KEYCODE_F1, + /* 3B */ Common::KEYCODE_F2, + /* 3C */ Common::KEYCODE_F3, + /* 3D */ Common::KEYCODE_F4, + /* 3E */ Common::KEYCODE_F5, + /* 3F */ Common::KEYCODE_F6, + /* 40 */ Common::KEYCODE_F7, + /* 41 */ Common::KEYCODE_F8, + /* 42 */ Common::KEYCODE_F9, + /* 43 */ Common::KEYCODE_F10, + /* 44 */ Common::KEYCODE_F11, + /* 45 */ Common::KEYCODE_F12, + /* 46 */ Common::KEYCODE_PRINT, + /* 47 */ Common::KEYCODE_SCROLLOCK, + /* 48 */ Common::KEYCODE_PAUSE, + /* 49 */ Common::KEYCODE_INSERT, + /* 4A */ Common::KEYCODE_HOME, + /* 4B */ Common::KEYCODE_PAGEUP, + /* 4C */ Common::KEYCODE_DELETE, + /* 4D */ Common::KEYCODE_END, + /* 4E */ Common::KEYCODE_PAGEDOWN, + /* 4F */ Common::KEYCODE_RIGHT, + /* 50 */ Common::KEYCODE_LEFT, + /* 51 */ Common::KEYCODE_DOWN, + /* 52 */ Common::KEYCODE_UP, + /* 53 */ Common::KEYCODE_NUMLOCK, + /* 54 */ Common::KEYCODE_KP_DIVIDE, + /* 55 */ Common::KEYCODE_KP_MULTIPLY, + /* 56 */ Common::KEYCODE_KP_MINUS, + /* 57 */ Common::KEYCODE_KP_PLUS, + /* 58 */ Common::KEYCODE_KP_ENTER, + /* 59 */ Common::KEYCODE_KP1, + /* 5A */ Common::KEYCODE_KP2, + /* 5B */ Common::KEYCODE_KP3, + /* 5C */ Common::KEYCODE_KP4, + /* 5D */ Common::KEYCODE_KP5, + /* 5E */ Common::KEYCODE_KP6, + /* 5F */ Common::KEYCODE_KP7, + /* 60 */ Common::KEYCODE_KP8, + /* 61 */ Common::KEYCODE_KP9, + /* 62 */ Common::KEYCODE_KP0, + /* 63 */ Common::KEYCODE_KP_PERIOD, /* 64 */ 0, /* 65 */ 0, /* 66 */ 0, - /* 67 */ SDLK_KP_EQUALS, + /* 67 */ Common::KEYCODE_KP_EQUALS, /* 68 */ 0, /* 69 */ 0, /* 6A */ 0, @@ -476,13 +475,13 @@ const int Ps2Input::_usbToSdlk[0x100] = { /* DD */ 0, /* DE */ 0, /* DF */ 0, - /* E0 */ SDLK_LCTRL, - /* E1 */ SDLK_LSHIFT, - /* E2 */ SDLK_LALT, + /* E0 */ Common::KEYCODE_LCTRL, + /* E1 */ Common::KEYCODE_LSHIFT, + /* E2 */ Common::KEYCODE_LALT, /* E3 */ 0, - /* E4 */ SDLK_RCTRL, - /* E5 */ SDLK_RSHIFT, - /* E6 */ SDLK_RALT, + /* E4 */ Common::KEYCODE_RCTRL, + /* E5 */ Common::KEYCODE_RSHIFT, + /* E6 */ Common::KEYCODE_RALT, /* E7 */ 0, /* E8 */ 0, /* E9 */ 0, @@ -511,22 +510,22 @@ const int Ps2Input::_usbToSdlk[0x100] = { }; const int Ps2Input::_padCodes[16] = { - SDLK_1, // Select + Common::KEYCODE_1, // Select 0, // L3 0, // R3 - SDLK_F5, // Start + Common::KEYCODE_F5, // Start 0, // Up 0, // Right 0, // Down 0, // Left - SDLK_KP0, // L2 + Common::KEYCODE_KP0, // L2 0, // R2 - SDLK_n, // L1 - SDLK_y, // R1 - SDLK_ESCAPE, // Triangle + Common::KEYCODE_n, // L1 + Common::KEYCODE_y, // R1 + Common::KEYCODE_ESCAPE, // Triangle 0, // Circle => Right mouse button 0, // Cross => Left mouse button - SDLK_RETURN // Square + Common::KEYCODE_RETURN // Square }; const int Ps2Input::_padFlags[16] = { diff --git a/backends/platform/ps2/sdlkeys.h b/backends/platform/ps2/sdlkeys.h deleted file mode 100644 index b2f783cedd..0000000000 --- a/backends/platform/ps2/sdlkeys.h +++ /dev/null @@ -1,264 +0,0 @@ -/* copied from SDK_keysym.h */ - -#ifndef __SDLKEYS_H__ -#define __SDLKEYS_H__ - -enum SdlKeyCodes { - SDLK_UNKNOWN = 0, - SDLK_FIRST = 0, - SDLK_BACKSPACE = 8, - SDLK_TAB = 9, - SDLK_CLEAR = 12, - SDLK_RETURN = 13, - SDLK_PAUSE = 19, - SDLK_ESCAPE = 27, - SDLK_SPACE = 32, - SDLK_EXCLAIM = 33, - SDLK_QUOTEDBL = 34, - SDLK_HASH = 35, - SDLK_DOLLAR = 36, - SDLK_AMPERSAND = 38, - SDLK_QUOTE = 39, - SDLK_LEFTPAREN = 40, - SDLK_RIGHTPAREN = 41, - SDLK_ASTERISK = 42, - SDLK_PLUS = 43, - SDLK_COMMA = 44, - SDLK_MINUS = 45, - SDLK_PERIOD = 46, - SDLK_SLASH = 47, - SDLK_0 = 48, - SDLK_1 = 49, - SDLK_2 = 50, - SDLK_3 = 51, - SDLK_4 = 52, - SDLK_5 = 53, - SDLK_6 = 54, - SDLK_7 = 55, - SDLK_8 = 56, - SDLK_9 = 57, - SDLK_COLON = 58, - SDLK_SEMICOLON = 59, - SDLK_LESS = 60, - SDLK_EQUALS = 61, - SDLK_GREATER = 62, - SDLK_QUESTION = 63, - SDLK_AT = 64, - /* - Skip uppercase letters - */ - SDLK_LEFTBRACKET = 91, - SDLK_BACKSLASH = 92, - SDLK_RIGHTBRACKET = 93, - SDLK_CARET = 94, - SDLK_UNDERSCORE = 95, - SDLK_BACKQUOTE = 96, - SDLK_a = 97, - SDLK_b = 98, - SDLK_c = 99, - SDLK_d = 100, - SDLK_e = 101, - SDLK_f = 102, - SDLK_g = 103, - SDLK_h = 104, - SDLK_i = 105, - SDLK_j = 106, - SDLK_k = 107, - SDLK_l = 108, - SDLK_m = 109, - SDLK_n = 110, - SDLK_o = 111, - SDLK_p = 112, - SDLK_q = 113, - SDLK_r = 114, - SDLK_s = 115, - SDLK_t = 116, - SDLK_u = 117, - SDLK_v = 118, - SDLK_w = 119, - SDLK_x = 120, - SDLK_y = 121, - SDLK_z = 122, - SDLK_DELETE = 127, - /* End of ASCII mapped keysyms */ - - /* International keyboard syms */ - SDLK_WORLD_0 = 160, /* 0xA0 */ - SDLK_WORLD_1 = 161, - SDLK_WORLD_2 = 162, - SDLK_WORLD_3 = 163, - SDLK_WORLD_4 = 164, - SDLK_WORLD_5 = 165, - SDLK_WORLD_6 = 166, - SDLK_WORLD_7 = 167, - SDLK_WORLD_8 = 168, - SDLK_WORLD_9 = 169, - SDLK_WORLD_10 = 170, - SDLK_WORLD_11 = 171, - SDLK_WORLD_12 = 172, - SDLK_WORLD_13 = 173, - SDLK_WORLD_14 = 174, - SDLK_WORLD_15 = 175, - SDLK_WORLD_16 = 176, - SDLK_WORLD_17 = 177, - SDLK_WORLD_18 = 178, - SDLK_WORLD_19 = 179, - SDLK_WORLD_20 = 180, - SDLK_WORLD_21 = 181, - SDLK_WORLD_22 = 182, - SDLK_WORLD_23 = 183, - SDLK_WORLD_24 = 184, - SDLK_WORLD_25 = 185, - SDLK_WORLD_26 = 186, - SDLK_WORLD_27 = 187, - SDLK_WORLD_28 = 188, - SDLK_WORLD_29 = 189, - SDLK_WORLD_30 = 190, - SDLK_WORLD_31 = 191, - SDLK_WORLD_32 = 192, - SDLK_WORLD_33 = 193, - SDLK_WORLD_34 = 194, - SDLK_WORLD_35 = 195, - SDLK_WORLD_36 = 196, - SDLK_WORLD_37 = 197, - SDLK_WORLD_38 = 198, - SDLK_WORLD_39 = 199, - SDLK_WORLD_40 = 200, - SDLK_WORLD_41 = 201, - SDLK_WORLD_42 = 202, - SDLK_WORLD_43 = 203, - SDLK_WORLD_44 = 204, - SDLK_WORLD_45 = 205, - SDLK_WORLD_46 = 206, - SDLK_WORLD_47 = 207, - SDLK_WORLD_48 = 208, - SDLK_WORLD_49 = 209, - SDLK_WORLD_50 = 210, - SDLK_WORLD_51 = 211, - SDLK_WORLD_52 = 212, - SDLK_WORLD_53 = 213, - SDLK_WORLD_54 = 214, - SDLK_WORLD_55 = 215, - SDLK_WORLD_56 = 216, - SDLK_WORLD_57 = 217, - SDLK_WORLD_58 = 218, - SDLK_WORLD_59 = 219, - SDLK_WORLD_60 = 220, - SDLK_WORLD_61 = 221, - SDLK_WORLD_62 = 222, - SDLK_WORLD_63 = 223, - SDLK_WORLD_64 = 224, - SDLK_WORLD_65 = 225, - SDLK_WORLD_66 = 226, - SDLK_WORLD_67 = 227, - SDLK_WORLD_68 = 228, - SDLK_WORLD_69 = 229, - SDLK_WORLD_70 = 230, - SDLK_WORLD_71 = 231, - SDLK_WORLD_72 = 232, - SDLK_WORLD_73 = 233, - SDLK_WORLD_74 = 234, - SDLK_WORLD_75 = 235, - SDLK_WORLD_76 = 236, - SDLK_WORLD_77 = 237, - SDLK_WORLD_78 = 238, - SDLK_WORLD_79 = 239, - SDLK_WORLD_80 = 240, - SDLK_WORLD_81 = 241, - SDLK_WORLD_82 = 242, - SDLK_WORLD_83 = 243, - SDLK_WORLD_84 = 244, - SDLK_WORLD_85 = 245, - SDLK_WORLD_86 = 246, - SDLK_WORLD_87 = 247, - SDLK_WORLD_88 = 248, - SDLK_WORLD_89 = 249, - SDLK_WORLD_90 = 250, - SDLK_WORLD_91 = 251, - SDLK_WORLD_92 = 252, - SDLK_WORLD_93 = 253, - SDLK_WORLD_94 = 254, - SDLK_WORLD_95 = 255, /* 0xFF */ - - /* Numeric keypad */ - SDLK_KP0 = 256, - SDLK_KP1 = 257, - SDLK_KP2 = 258, - SDLK_KP3 = 259, - SDLK_KP4 = 260, - SDLK_KP5 = 261, - SDLK_KP6 = 262, - SDLK_KP7 = 263, - SDLK_KP8 = 264, - SDLK_KP9 = 265, - SDLK_KP_PERIOD = 266, - SDLK_KP_DIVIDE = 267, - SDLK_KP_MULTIPLY = 268, - SDLK_KP_MINUS = 269, - SDLK_KP_PLUS = 270, - SDLK_KP_ENTER = 271, - SDLK_KP_EQUALS = 272, - - /* Arrows + Home/End pad */ - SDLK_UP = 273, - SDLK_DOWN = 274, - SDLK_RIGHT = 275, - SDLK_LEFT = 276, - SDLK_INSERT = 277, - SDLK_HOME = 278, - SDLK_END = 279, - SDLK_PAGEUP = 280, - SDLK_PAGEDOWN = 281, - - /* Function keys */ - SDLK_F1 = 282, - SDLK_F2 = 283, - SDLK_F3 = 284, - SDLK_F4 = 285, - SDLK_F5 = 286, - SDLK_F6 = 287, - SDLK_F7 = 288, - SDLK_F8 = 289, - SDLK_F9 = 290, - SDLK_F10 = 291, - SDLK_F11 = 292, - SDLK_F12 = 293, - SDLK_F13 = 294, - SDLK_F14 = 295, - SDLK_F15 = 296, - - /* Key state modifier keys */ - SDLK_NUMLOCK = 300, - SDLK_CAPSLOCK = 301, - SDLK_SCROLLOCK = 302, - SDLK_RSHIFT = 303, - SDLK_LSHIFT = 304, - SDLK_RCTRL = 305, - SDLK_LCTRL = 306, - SDLK_RALT = 307, - SDLK_LALT = 308, - SDLK_RMETA = 309, - SDLK_LMETA = 310, - SDLK_LSUPER = 311, /* Left "Windows" key */ - SDLK_RSUPER = 312, /* Right "Windows" key */ - SDLK_MODE = 313, /* "Alt Gr" key */ - SDLK_COMPOSE = 314, /* Multi-key compose key */ - - /* Miscellaneous function keys */ - SDLK_HELP = 315, - SDLK_PRINT = 316, - SDLK_SYSREQ = 317, - SDLK_BREAK = 318, - SDLK_MENU = 319, - SDLK_POWER = 320, /* Power Macintosh power key */ - SDLK_EURO = 321, /* Some european keyboards */ - SDLK_UNDO = 322, /* Atari keyboard has Undo */ - - /* Add any other keys here */ - - SDLK_LAST -}; - -#endif - - diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index f7c18e5142..20a50c1b47 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -447,19 +447,19 @@ bool OSystem_PSP::pollEvent(Common::Event &event) { event.kbd.flags = 0; if (buttonsChanged & PSP_CTRL_LTRIGGER) { - event.kbd.keycode = SDLK_ESCAPE; + event.kbd.keycode = Common::KEYCODE_ESCAPE; event.kbd.ascii = 27; } else if (buttonsChanged & PSP_CTRL_RTRIGGER) { - event.kbd.keycode = SDLK_RETURN; + event.kbd.keycode = Common::KEYCODE_RETURN; event.kbd.ascii = 13; } else if (buttonsChanged & PSP_CTRL_START) { - event.kbd.keycode = SDLK_F5; - event.kbd.ascii = 319; + event.kbd.keycode = Common::KEYCODE_F5; + event.kbd.ascii = Common::ASCII_F5; /* } else if (buttonsChanged & PSP_CTRL_SELECT) { - event.kbd.keycode = SDLK_0; + event.kbd.keycode = Common::KEYCODE_0; event.kbd.ascii = '0'; */ } else if (buttonsChanged & PSP_CTRL_SQUARE) { - event.kbd.keycode = SDLK_PERIOD; + event.kbd.keycode = Common::KEYCODE_PERIOD; event.kbd.ascii = '.'; } diff --git a/backends/platform/psp/osys_psp_gu.cpp b/backends/platform/psp/osys_psp_gu.cpp index 5175460007..d40f1559ec 100644 --- a/backends/platform/psp/osys_psp_gu.cpp +++ b/backends/platform/psp/osys_psp_gu.cpp @@ -59,11 +59,11 @@ unsigned char *keyboard_letters; unsigned char *keyboard_letters_shift; unsigned char kbd_ascii[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', '[', ']', '\\', ';', '\'', ',', '.', '/', '`'}; -unsigned int kbd_code[] = {SDLK_1, SDLK_2, SDLK_3, SDLK_4, SDLK_5, SDLK_6, SDLK_7, SDLK_8, SDLK_9, SDLK_0, SDLK_MINUS, SDLK_EQUALS, SDLK_LEFTBRACKET, SDLK_RIGHTBRACKET, - SDLK_BACKSLASH, SDLK_SEMICOLON, SDLK_QUOTE, SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH, SDLK_BACKQUOTE}; +unsigned int kbd_code[] = {Common::KEYCODE_1, Common::KEYCODE_2, Common::KEYCODE_3, Common::KEYCODE_4, Common::KEYCODE_5, Common::KEYCODE_6, Common::KEYCODE_7, Common::KEYCODE_8, Common::KEYCODE_9, Common::KEYCODE_0, Common::KEYCODE_MINUS, Common::KEYCODE_EQUALS, Common::KEYCODE_LEFTBRACKET, Common::KEYCODE_RIGHTBRACKET, + Common::KEYCODE_BACKSLASH, Common::KEYCODE_SEMICOLON, Common::KEYCODE_QUOTE, Common::KEYCODE_COMMA, Common::KEYCODE_PERIOD, Common::KEYCODE_SLASH, Common::KEYCODE_BACKQUOTE}; unsigned char kbd_ascii_cl[] = {'!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '{', '}', '|', ':', '"', '<', '>', '?', '~'}; -unsigned int kbd_code_cl[] = {SDLK_EXCLAIM, SDLK_AT, SDLK_HASH, SDLK_DOLLAR, 37, SDLK_CARET, SDLK_AMPERSAND, SDLK_ASTERISK, SDLK_LEFTPAREN, SDLK_RIGHTPAREN, SDLK_UNDERSCORE, - SDLK_PLUS, 123, 125, 124, SDLK_COLON, SDLK_QUOTEDBL, SDLK_LESS, SDLK_GREATER, SDLK_QUESTION, 126}; +unsigned int kbd_code_cl[] = {Common::KEYCODE_EXCLAIM, Common::KEYCODE_AT, Common::KEYCODE_HASH, Common::KEYCODE_DOLLAR, 37, Common::KEYCODE_CARET, Common::KEYCODE_AMPERSAND, Common::KEYCODE_ASTERISK, Common::KEYCODE_LEFTPAREN, Common::KEYCODE_RIGHTPAREN, Common::KEYCODE_UNDERSCORE, + Common::KEYCODE_PLUS, 123, 125, 124, Common::KEYCODE_COLON, Common::KEYCODE_QUOTEDBL, Common::KEYCODE_LESS, Common::KEYCODE_GREATER, Common::KEYCODE_QUESTION, 126}; #define CAPS_LOCK (1 << 0) #define SYMBOLS (1 << 1) @@ -487,7 +487,7 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) { if ( (buttonsChanged & PSP_CTRL_LEFT) && !(pad.Buttons & PSP_CTRL_LEFT)) { event.kbd.flags = 0; event.kbd.ascii = 0; - event.kbd.keycode = SDLK_LEFT; + event.kbd.keycode = Common::KEYCODE_LEFT; _prevButtons = pad.Buttons; return true; } @@ -495,7 +495,7 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) { if ( (buttonsChanged & PSP_CTRL_RIGHT) && !(pad.Buttons & PSP_CTRL_RIGHT)) { event.kbd.flags = 0; event.kbd.ascii = 0; - event.kbd.keycode = SDLK_RIGHT; + event.kbd.keycode = Common::KEYCODE_RIGHT; _prevButtons = pad.Buttons; return true; } @@ -503,7 +503,7 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) { if ( (buttonsChanged & PSP_CTRL_UP) && !(pad.Buttons & PSP_CTRL_UP)) { event.kbd.flags = 0; event.kbd.ascii = 0; - event.kbd.keycode = SDLK_UP; + event.kbd.keycode = Common::KEYCODE_UP; _prevButtons = pad.Buttons; return true; } @@ -511,7 +511,7 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) { if ( (buttonsChanged & PSP_CTRL_DOWN) && !(pad.Buttons & PSP_CTRL_DOWN)) { event.kbd.flags = 0; event.kbd.ascii = 0; - event.kbd.keycode = SDLK_DOWN; + event.kbd.keycode = Common::KEYCODE_DOWN; _prevButtons = pad.Buttons; return true; } @@ -535,19 +535,19 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) { switch(_keySelected) { case 27: event.kbd.ascii = ' '; - event.kbd.keycode = SDLK_SPACE; + event.kbd.keycode = Common::KEYCODE_SPACE; break; case 28: event.kbd.ascii = 127; - event.kbd.keycode = SDLK_DELETE; + event.kbd.keycode = Common::KEYCODE_DELETE; break; case 29: event.kbd.ascii = 8; - event.kbd.keycode = SDLK_BACKSPACE; + event.kbd.keycode = Common::KEYCODE_BACKSPACE; break; case 30: event.kbd.ascii = 13; - event.kbd.keycode = SDLK_RETURN; + event.kbd.keycode = Common::KEYCODE_RETURN; break; } } else { @@ -555,11 +555,11 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) { case 0: event.kbd.flags = 0; event.kbd.ascii = 'a'+_keySelected-1; - event.kbd.keycode = SDLK_a + _keySelected-1; + event.kbd.keycode = Common::KEYCODE_a + _keySelected-1; break; case CAPS_LOCK: event.kbd.ascii = 'A'+_keySelected-1; - event.kbd.keycode = SDLK_a + _keySelected-1; + event.kbd.keycode = Common::KEYCODE_a + _keySelected-1; event.kbd.flags = Common::KBD_SHIFT; break; case SYMBOLS: diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp index c13c011efa..56636dfaa9 100644 --- a/backends/platform/sdl/events.cpp +++ b/backends/platform/sdl/events.cpp @@ -455,21 +455,21 @@ bool OSystem_SDL::remapKey(SDL_Event &ev,Common::Event &event) { // Map menu key to f5 (scumm menu) if (ev.key.keysym.sym == 306) { event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = SDLK_F5; + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0); return true; } // Map action key to action if (ev.key.keysym.sym == 291) { event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = SDLK_TAB; + event.kbd.keycode = Common::KEYCODE_TAB; event.kbd.ascii = mapKey(SDLK_TAB, ev.key.keysym.mod, 0); return true; } // Map OK key to skip cinematic if (ev.key.keysym.sym == 292) { event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = SDLK_ESCAPE; + event.kbd.keycode = Common::KEYCODE_ESCAPE; event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0); return true; } @@ -485,7 +485,7 @@ bool OSystem_SDL::remapKey(SDL_Event &ev,Common::Event &event) { // Map menu key (f11) to f5 (scumm menu) if (ev.key.keysym.sym == SDLK_F11) { event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = SDLK_F5; + event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0); } // Nap center (space) to tab (default action ) @@ -493,13 +493,13 @@ bool OSystem_SDL::remapKey(SDL_Event &ev,Common::Event &event) { // else if (ev.key.keysym.sym == SDLK_SPACE) { event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = SDLK_TAB; + event.kbd.keycode = Common::KEYCODE_TAB; event.kbd.ascii = mapKey(SDLK_TAB, ev.key.keysym.mod, 0); } // Since we stole space (pause) above we'll rebind it to the tab key on the keyboard else if (ev.key.keysym.sym == SDLK_TAB) { event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = SDLK_SPACE; + event.kbd.keycode = Common::KEYCODE_SPACE; event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0); } else { // Let the events fall through if we didn't change them, this may not be the best way to diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp index e65af8fc53..55af5085a2 100644 --- a/backends/platform/wince/CEActionsSmartphone.cpp +++ b/backends/platform/wince/CEActionsSmartphone.cpp @@ -131,13 +131,13 @@ void CEActionsSmartphone::initInstanceGame() { _action_enabled[SMARTPHONE_ACTION_SAVE] = false; else if (is_queen) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; - _key_action[SMARTPHONE_ACTION_SAVE].setAscii(286); // F1 key for FOTAQ + _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_F5); // F1 key for FOTAQ } else if (is_sky) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; - _key_action[SMARTPHONE_ACTION_SAVE].setAscii(63); + _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_QUESTION); } else if (is_cine) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; - _key_action[SMARTPHONE_ACTION_SAVE].setAscii(291); //F10 + _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_F10); //F10 } else if (is_agi) { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_ESCAPE); @@ -146,7 +146,7 @@ void CEActionsSmartphone::initInstanceGame() { _key_action[SMARTPHONE_ACTION_SAVE].setAscii(SDLK_s); } else { _action_enabled[SMARTPHONE_ACTION_SAVE] = true; - _key_action[SMARTPHONE_ACTION_SAVE].setAscii(319); // F5 key + _key_action[SMARTPHONE_ACTION_SAVE].setAscii(Common::ASCII_F5); // F5 key } // Skip _action_enabled[SMARTPHONE_ACTION_SKIP] = true; @@ -161,7 +161,7 @@ void CEActionsSmartphone::initInstanceGame() { if (is_agi) _key_action[SMARTPHONE_ACTION_MULTI].setAscii(SDLK_PAUSE); // agi: show predictive dialog else if (is_gob) - _key_action[SMARTPHONE_ACTION_MULTI].setAscii(315); // bargon : F1 to start + _key_action[SMARTPHONE_ACTION_MULTI].setAscii(Common::ASCII_F1); // bargon : F1 to start else if (gameid == "atlantis") _key_action[SMARTPHONE_ACTION_MULTI].setAscii(SDLK_KP0); // fate of atlantis : Ins to sucker-punch else |