Ignore caps lock and numlock for keyboard bindings. The way Xlib makes
you do this is ugly. Also remove mod2 (numlock) and mod3 (odd) from the list of keybinding modifiers. They don't make much sense here. based on a heavily modified diff from Martynas. ok okan.
This commit is contained in:
@@ -228,6 +228,9 @@ xev_handle_buttonpress(struct xevent *xev, XEvent *ee)
|
||||
|
||||
cc = client_find(e->window);
|
||||
|
||||
/* Ignore caps lock and numlock */
|
||||
e->state &= ~(Mod2Mask | LockMask);
|
||||
|
||||
TAILQ_FOREACH(mb, &Conf.mousebindingq, entry) {
|
||||
if (e->button == mb->button && e->state == mb->modmask)
|
||||
break;
|
||||
@@ -273,6 +276,9 @@ xev_handle_keypress(struct xevent *xev, XEvent *ee)
|
||||
keysym = XKeycodeToKeysym(X_Dpy, e->keycode, 0);
|
||||
skeysym = XKeycodeToKeysym(X_Dpy, e->keycode, 1);
|
||||
|
||||
/* we don't care about caps lock and numlock here */
|
||||
e->state &= ~(LockMask | Mod2Mask);
|
||||
|
||||
TAILQ_FOREACH(kb, &Conf.keybindingq, entry) {
|
||||
if (keysym != kb->keysym && skeysym == kb->keysym)
|
||||
modshift = ShiftMask;
|
||||
|
||||
Reference in New Issue
Block a user