diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/keymapper/remap-dialog.cpp | 11 | ||||
-rw-r--r-- | backends/keymapper/remap-dialog.h | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/backends/keymapper/remap-dialog.cpp b/backends/keymapper/remap-dialog.cpp index 7f58965120..35706e89dd 100644 --- a/backends/keymapper/remap-dialog.cpp +++ b/backends/keymapper/remap-dialog.cpp @@ -191,6 +191,8 @@ void RemapDialog::reflowLayout() { } void RemapDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { + debug(0, "Command!"); + if (cmd >= kRemapCmd && cmd < kRemapCmd + _keymapWidgets.size()) { startRemapping(cmd - kRemapCmd); } else if (cmd == GUI::kPopUpItemSelectedCmd) { @@ -226,6 +228,13 @@ void RemapDialog::stopRemapping() { _keymapper->setEnabled(true); } +void RemapDialog::handleKeyDown(Common::KeyState state) { + if (_activeRemapAction) + return; + + GUI::Dialog::handleKeyDown(state); +} + void RemapDialog::handleKeyUp(Common::KeyState state) { if (_activeRemapAction) { const HardwareKey *hwkey = _keymapper->findHardwareKey(state); @@ -239,7 +248,7 @@ void RemapDialog::handleKeyUp(Common::KeyState state) { stopRemapping(); } } else { - GUI::Dialog::handleKeyDown(state); + GUI::Dialog::handleKeyUp(state); } } diff --git a/backends/keymapper/remap-dialog.h b/backends/keymapper/remap-dialog.h index 07b712e55b..abec8a2d5c 100644 --- a/backends/keymapper/remap-dialog.h +++ b/backends/keymapper/remap-dialog.h @@ -47,6 +47,7 @@ public: virtual void close(); virtual void reflowLayout(); virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); + virtual void handleKeyDown(Common::KeyState state); virtual void handleKeyUp(Common::KeyState state); virtual void handleMouseDown(int x, int y, int button, int clickCount); virtual void handleTickle(); |