diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-01-26 16:20:45 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-01-26 16:20:45 +0100 |
commit | 570db2e7be4e50e04b6d46fe63de03ee5f38d3ed (patch) | |
tree | 3a2e511554265bcb5d52f64fa9fa56f00851ee89 /src | |
parent | 39073b4c7f7085f566231843089fba8bd4a26740 (diff) |
Restrict modifiers to Control/Mod1/Mod4, ignore NumLock (closes GH-31)
Diffstat (limited to 'src')
-rw-r--r-- | src/keyevents.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/keyevents.c b/src/keyevents.c index c2372bd..8e2b181 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -58,18 +58,9 @@ static void feh_set_parse_kb_partial(fehkey *key, int index, char *ks) { case '1': mod = Mod1Mask; break; - case '2': - mod = Mod2Mask; - break; - case '3': - mod = Mod3Mask; - break; case '4': mod = Mod4Mask; break; - case '5': - mod = Mod5Mask; - break; default: weprintf("keys: invalid modifier %c in %s", ks[0], ks); break; @@ -349,8 +340,7 @@ void feh_event_handle_keypress(XEvent * ev) kev = (XKeyEvent *) ev; len = XLookupString(&ev->xkey, (char *) kbuf, sizeof(kbuf), &keysym, NULL); - state = kev->state & (ControlMask | Mod1Mask | Mod2Mask | Mod3Mask | - Mod4Mask | Mod5Mask); + state = kev->state & (ControlMask | Mod1Mask | Mod4Mask); /* menus are showing, so this is a menu control keypress */ if (ev->xbutton.window == menu_cover) { |