diff options
Diffstat (limited to 'xevents.c')
-rw-r--r-- | xevents.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: xevents.c,v 1.22 2008/06/17 20:55:48 oga Exp $ + * $Id: xevents.c,v 1.23 2008/06/17 23:40:33 oga Exp $ */ /* @@ -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; |