summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-06-19 18:44:55 +0200
committerDaniel Friesel <derf@finalrewind.org>2017-06-19 18:45:30 +0200
commit428c7eedb8a617b2bb69f3526073270c6048236b (patch)
treeb0751f1e191b32f7078097c6e3c2822018fd1326 /src
parent5888d94b00196ba8bf64774b9f71abdb9948c9ff (diff)
Fix Shift modifier not being recognized for tab, space and similar keys
Closes #303
Diffstat (limited to 'src')
-rw-r--r--src/keyevents.c4
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 */