From c293611f62d83359e3c780ce556859151900864b Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 1 Jun 2014 22:36:45 -0400 Subject: PEGASUS: Stop using num lock for a way to open the inventory drawer --- engines/pegasus/input.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/pegasus/input.cpp b/engines/pegasus/input.cpp index 283d55421f..3f16acc2f6 100644 --- a/engines/pegasus/input.cpp +++ b/engines/pegasus/input.cpp @@ -57,7 +57,6 @@ InputDeviceManager::InputDeviceManager() { _keyMap[Common::KEYCODE_p] = false; _keyMap[Common::KEYCODE_TILDE] = false; _keyMap[Common::KEYCODE_BACKQUOTE] = false; - _keyMap[Common::KEYCODE_NUMLOCK] = false; _keyMap[Common::KEYCODE_BACKSPACE] = false; _keyMap[Common::KEYCODE_KP_MULTIPLY] = false; _keyMap[Common::KEYCODE_LALT] = false; @@ -113,7 +112,12 @@ void InputDeviceManager::getInput(Input &input, const InputBits filter) { if (_keyMap[Common::KEYCODE_ESCAPE] || _keyMap[Common::KEYCODE_p]) currentBits |= (kRawButtonDown << kMod3ButtonShift); - if (_keyMap[Common::KEYCODE_TILDE] || _keyMap[Common::KEYCODE_BACKQUOTE] || _keyMap[Common::KEYCODE_NUMLOCK]) + // The original also used clear (aka "num lock" on Mac keyboards) here, but it doesn't + // work right on most systems. Either SDL or the OS treats num lock specially and the + // 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]) currentBits |= (kRawButtonDown << kLeftFireButtonShift); if (_keyMap[Common::KEYCODE_BACKSPACE] || _keyMap[Common::KEYCODE_KP_MULTIPLY]) -- cgit v1.2.3