From d55ce3626800cfa316bb90a1e2fcc0b3d5dbe203 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 Dec 2011 01:15:06 +0200 Subject: KEYMAPPER: Use hasFlags() in findHardwareKey() --- backends/keymapper/hardware-key.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'backends/keymapper') diff --git a/backends/keymapper/hardware-key.h b/backends/keymapper/hardware-key.h index 014e73a11e..daa853df08 100644 --- a/backends/keymapper/hardware-key.h +++ b/backends/keymapper/hardware-key.h @@ -97,12 +97,8 @@ public: List::const_iterator it; for (it = _keys.begin(); it != _keys.end(); 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); - } + if (keystate.keycode == (*it)->key.keycode && keystate.hasFlags((*it)->key.flags)) + return (*it); } return 0; } -- cgit v1.2.3