From de4394ada8a6db2c3065f497884fff5ffdba0aef Mon Sep 17 00:00:00 2001 From: Sascha Kruse Date: Fri, 19 Oct 2012 09:13:09 +0200 Subject: [PATCH] always check both shift levels when looking up key See github issue #73 --- dunst.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dunst.c b/dunst.c index 4f95f77..f44f762 100644 --- a/dunst.c +++ b/dunst.c @@ -1089,10 +1089,9 @@ void init_shortcut(keyboard_shortcut * ks) ks->code = NoSymbol; - int level = ks->mask & ShiftMask ? 1 : 0; - for (int i = min_keysym; i <= max_keysym; i++) { - if (XkbKeycodeToKeysym(dc->dpy, i, 0, level) == ks->sym) { + if (XkbKeycodeToKeysym(dc->dpy, i, 0, 0) == ks->sym + || XkbKeycodeToKeysym(dc->dpy, i, 0, 1) == ks->sym) { ks->code = i; break; }