[event] Fix handling of keysym/keycode in event_handle_keypress.
Only compare the configured one of these two properties for any given key. Signed-off-by: Jan Niehusmann <jan@gondor.com> Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
6623668b6f
commit
78dd0b8620
2
event.c
2
event.c
|
@ -353,7 +353,7 @@ event_handle_keypress(XEvent *e)
|
|||
keysym = XKeycodeToKeysym(globalconf.display, (KeyCode) ev->keycode, 0);
|
||||
|
||||
for(k = globalconf.keys; k; k = k->next)
|
||||
if((ev->keycode == k->keycode || keysym == k->keysym) &&
|
||||
if(((k->keycode && ev->keycode == k->keycode) || (k->keysym && keysym == k->keysym)) &&
|
||||
k->func && CLEANMASK(k->mod) == CLEANMASK(ev->state))
|
||||
k->func(screen, k->arg);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue