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 | |
| parent | 39073b4c7f7085f566231843089fba8bd4a26740 (diff) | |
Restrict modifiers to Control/Mod1/Mod4, ignore NumLock (closes GH-31)
| -rw-r--r-- | ChangeLog | 1 | ||||
| -rw-r--r-- | man/feh.pre | 2 | ||||
| -rw-r--r-- | src/keyevents.c | 12 | 
3 files changed, 3 insertions, 12 deletions
| @@ -5,6 +5,7 @@ git HEAD      * Add --zoom fill as equivalent for --auto-zoom      * Add --zoom max (zooming like in --bg-max)      * Remove support for FEH_OPTIONS (was deprecated >5 years ago) +    * Restrict available modifiers to Control/Mod1/Mod4  Sat, 22 Jan 2011 11:48:33 +0100 diff --git a/man/feh.pre b/man/feh.pre index 41dd66c..0b4a6c7 100644 --- a/man/feh.pre +++ b/man/feh.pre @@ -715,7 +715,7 @@ looks like  .Pp  Available modifiers are  .Ar C No for Control and -.Ar 1 No to Ar 5 No for Mod1 to Mod5 . +.Ar 1 , 4 No for Mod1 and Mod4 .  .Pp  Specifying an  .Ar action 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) { | 
