summaryrefslogtreecommitdiffstats
path: root/source/keyb.c
diff options
context:
space:
mode:
authorQuentin Glidic <sardemff7+git@sardemff7.net>2016-02-23 10:44:36 +0100
committerQuentin Glidic <sardemff7+git@sardemff7.net>2016-02-23 17:34:31 +0100
commit3029e05ac739cbfe026c997463dc4a57fd97a25e (patch)
tree02728d6359c1c4c6113a207aeda997a1715f58a3 /source/keyb.c
parent590e61b4174cf7dfac1ec9520c3a9a8b8a0bbf1d (diff)
keybindings: Rework modmask matching
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'source/keyb.c')
-rw-r--r--source/keyb.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/keyb.c b/source/keyb.c
index 4ed04a67..4c246022 100644
--- a/source/keyb.c
+++ b/source/keyb.c
@@ -26,8 +26,7 @@ typedef struct _DefaultBinding
char *keybinding;
} DefaultBinding;
-ActionBindingEntry abe[NUM_ABE];
-extern unsigned int CombinedMask;
+ActionBindingEntry abe[NUM_ABE];
/**
* LIST OF DEFAULT SETTINGS
@@ -139,12 +138,8 @@ int abe_test_action ( KeyBindingAction action, unsigned int mask, xkb_keysym_t k
for ( int iter = 0; iter < akb->num_bindings; iter++ ) {
const KeyBinding * const kb = &( akb->kb[iter] );
- if ( kb->keysym == key ) {
- // Bits 13 and 14 of the modifiers together are the group number, and
- // should be ignored when looking up key bindings
- if ( ( mask & ( CombinedMask ) ) == kb->modmask ) {
- return TRUE;
- }
+ if ( ( kb->keysym == key ) && ( kb->modmask == mask ) ) {
+ return TRUE;
}
}