aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/pegasus/input.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/pegasus/input.cpp b/engines/pegasus/input.cpp
index 3f16acc2f6..e1b7e25cd5 100644
--- a/engines/pegasus/input.cpp
+++ b/engines/pegasus/input.cpp
@@ -57,8 +57,10 @@ InputDeviceManager::InputDeviceManager() {
_keyMap[Common::KEYCODE_p] = false;
_keyMap[Common::KEYCODE_TILDE] = false;
_keyMap[Common::KEYCODE_BACKQUOTE] = false;
+ _keyMap[Common::KEYCODE_KP7] = false;
_keyMap[Common::KEYCODE_BACKSPACE] = false;
_keyMap[Common::KEYCODE_KP_MULTIPLY] = false;
+ _keyMap[Common::KEYCODE_KP9] = false;
_keyMap[Common::KEYCODE_LALT] = false;
_keyMap[Common::KEYCODE_RALT] = false;
_keyMap[Common::KEYCODE_e] = false;
@@ -117,10 +119,14 @@ void InputDeviceManager::getInput(Input &input, const InputBits filter) {
// events don't come as expected. In many cases, the key down event is sent many times
// causing the drawer to open and close constantly until pressed again. It only causes
// more grief than anything else.
- if (_keyMap[Common::KEYCODE_TILDE] || _keyMap[Common::KEYCODE_BACKQUOTE])
+
+ // The original doesn't use KP7 for inventory, but we're using it as an alternative for
+ // num lock. KP9 is used for the biochip drawer to balance things out.
+
+ if (_keyMap[Common::KEYCODE_TILDE] || _keyMap[Common::KEYCODE_BACKQUOTE] || _keyMap[Common::KEYCODE_KP7])
currentBits |= (kRawButtonDown << kLeftFireButtonShift);
- if (_keyMap[Common::KEYCODE_BACKSPACE] || _keyMap[Common::KEYCODE_KP_MULTIPLY])
+ if (_keyMap[Common::KEYCODE_BACKSPACE] || _keyMap[Common::KEYCODE_KP_MULTIPLY] || _keyMap[Common::KEYCODE_KP9])
currentBits |= (kRawButtonDown << kRightFireButtonShift);
// Update mouse button state