summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-02-09 17:11:03 -0500
committerJune McEnroe <june@causal.agency>2018-02-09 17:11:03 -0500
commit30285a679fa9572a43caa4eb77d5670274ecd0a7 (patch)
tree23583b3b7b3a766f8b7e20f3c3f161f0c0c79c0f /bin
parentClean up bin/gfx/x11.c (diff)
downloadsrc-30285a679fa9572a43caa4eb77d5670274ecd0a7.tar.gz
src-30285a679fa9572a43caa4eb77d5670274ecd0a7.zip
Fix X11 KeySym lookup with modifiers
On friends' systems there appear to be modifiers that are always set
which were intefering with selecting the KeySym based on the state of
shift.
Diffstat (limited to '')
-rw-r--r--bin/gfx/x11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/gfx/x11.c b/bin/gfx/x11.c
index 5112efba..524c8c63 100644
--- a/bin/gfx/x11.c
+++ b/bin/gfx/x11.c
@@ -101,7 +101,7 @@ int main(int argc, char *argv[]) {
         switch (event.type) {
             case KeyPress: {
                 XKeyEvent key = event.xkey;
-                KeySym sym = XLookupKeysym(&key, key.state);
+                KeySym sym = XLookupKeysym(&key, key.state & ShiftMask);
                 if (sym > 0x80) break;
                 if (!input(sym)) return EX_OK;
                 XStoreName(display, window, status());