From 410c9e0b30ae3f140bd55cfcfa05308d929da24e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 Dec 2011 00:08:31 +0200 Subject: KEYMAPPER: Fix broken implementation of findHardwareKey() This fixes the keymapper dialog (at least on desktop platforms), but the keymapper itself is still not working (tested with LoL) --- backends/keymapper/hardware-key.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'backends/keymapper/hardware-key.h') diff --git a/backends/keymapper/hardware-key.h b/backends/keymapper/hardware-key.h index 32df042525..014e73a11e 100644 --- a/backends/keymapper/hardware-key.h +++ b/backends/keymapper/hardware-key.h @@ -97,8 +97,12 @@ public: List::const_iterator it; for (it = _keys.begin(); it != _keys.end(); it++) { - if ((*it)->key == keystate) - return (*it); + if ((*it)->key.keycode == keystate.keycode) { + // Only check for control/alt/shift modifiers, not for sticky + // modifiers like num lock/caps lock/scroll lock + if ((*it)->key.flags == (keystate.flags & 7)) + return (*it); + } } return 0; } -- cgit v1.2.3