diff options
author | Daniel Friesel <derf@finalrewind.org> | 2017-06-19 18:44:55 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2017-06-19 18:45:30 +0200 |
commit | 428c7eedb8a617b2bb69f3526073270c6048236b (patch) | |
tree | b0751f1e191b32f7078097c6e3c2822018fd1326 /src | |
parent | 5888d94b00196ba8bf64774b9f71abdb9948c9ff (diff) |
Fix Shift modifier not being recognized for tab, space and similar keys
Closes #303
Diffstat (limited to 'src')
-rw-r--r-- | src/keyevents.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/keyevents.c b/src/keyevents.c index e4b7c7b..3932804 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -73,7 +73,7 @@ static void feh_set_parse_kb_partial(fehkey *key, int index, char *ks) { } key->keysyms[index] = XStringToKeysym(cur); - if (isascii(key->keysyms[index])) + if (isprint(key->keysyms[index]) && !isspace(key->keysyms[index])) mod &= ~ShiftMask; key->keystates[index] = mod; @@ -278,7 +278,7 @@ void feh_event_handle_keypress(XEvent * ev) XLookupString(&ev->xkey, (char *) kbuf, sizeof(kbuf), &keysym, NULL); state = kev->state & (ControlMask | ShiftMask | Mod1Mask | Mod4Mask); - if (isascii(keysym)) + if (isprint(keysym) && !isspace(keysym)) state &= ~ShiftMask; /* menus are showing, so this is a menu control keypress */ |