Bugfix: Correctly filter out the numlock state bit (doesn’t get cleared for some reason)

This fixes ticket #14
This commit is contained in:
Michael Stapelberg
2009-03-27 15:24:52 +01:00
parent 9077831ed3
commit a8478efa34
5 changed files with 65 additions and 3 deletions

View File

@ -107,7 +107,7 @@ int handle_key_press(void *ignored, xcb_connection_t *conn, xcb_key_press_event_
LOG("state %d\n", event->state);
/* Remove the numlock bit, all other bits are modifiers we can bind to */
uint16_t state_filtered = event->state & ~XCB_MOD_MASK_LOCK;
uint16_t state_filtered = event->state & ~(xcb_numlock_mask | XCB_MOD_MASK_LOCK);
/* Find the binding */
Binding *bind;