diff options
Diffstat (limited to 'engines/wintermute/base/base_keyboard_state.cpp')
-rw-r--r-- | engines/wintermute/base/base_keyboard_state.cpp | 48 |
1 files changed, 41 insertions, 7 deletions
diff --git a/engines/wintermute/base/base_keyboard_state.cpp b/engines/wintermute/base/base_keyboard_state.cpp index 61087c5836..0babc07586 100644 --- a/engines/wintermute/base/base_keyboard_state.cpp +++ b/engines/wintermute/base/base_keyboard_state.cpp @@ -278,10 +278,24 @@ uint32 BaseKeyboardState::keyCodeToVKey(Common::Event *event) { enum VKeyCodes { kVkEscape = 27, kVkSpace = 32, + kVkHome = 36, kVkLeft = 37, kVkUp = 38, kVkRight = 39, - kVkDown = 40 + kVkDown = 40, + + kVkF1 = 112, + kVkF2 = 113, + kVkF3 = 114, + kVkF4 = 115, + kVkF5 = 116, + kVkF6 = 117, + kVkF7 = 118, + kVkF8 = 119, + kVkF9 = 120, + kVkF10 = 121, + kVkF11 = 122, + kVkF12 = 123 }; ////////////////////////////////////////////////////////////////////////// @@ -290,22 +304,42 @@ Common::KeyCode BaseKeyboardState::vKeyToKeyCode(uint32 vkey) { switch (vkey) { case kVkEscape: return Common::KEYCODE_ESCAPE; - break; case kVkSpace: return Common::KEYCODE_SPACE; - break; + case kVkHome: + return Common::KEYCODE_HOME; case kVkLeft: return Common::KEYCODE_LEFT; - break; case kVkRight: return Common::KEYCODE_RIGHT; - break; case kVkUp: return Common::KEYCODE_UP; - break; case kVkDown: return Common::KEYCODE_DOWN; - break; + case kVkF1: + return Common::KEYCODE_F1; + case kVkF2: + return Common::KEYCODE_F2; + case kVkF3: + return Common::KEYCODE_F3; + case kVkF4: + return Common::KEYCODE_F4; + case kVkF5: + return Common::KEYCODE_F5; + case kVkF6: + return Common::KEYCODE_F6; + case kVkF7: + return Common::KEYCODE_F7; + case kVkF8: + return Common::KEYCODE_F8; + case kVkF9: + return Common::KEYCODE_F9; + case kVkF10: + return Common::KEYCODE_F10; + case kVkF11: + return Common::KEYCODE_F11; + case kVkF12: + return Common::KEYCODE_F12; default: warning("Unknown VKEY: %d", vkey); return (Common::KeyCode)vkey; |