summary refs log tree commit diff
path: root/bin/gfx/x11.c
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/gfx/x11.c
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 'bin/gfx/x11.c')
-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());
c Detective AgencyJune McEnroe 2019-02-20Move /opt/pkg after /usr in PATHJune McEnroe 2019-02-20Set man_hard_wrap in nvimJune McEnroe 2019-02-18Use hi -o anchor in upJune McEnroe 2019-02-18Don't match nested parentheses in Tag for CJune McEnroe 2019-02-18Match whitespace between * [] {}June McEnroe 2019-02-18Fix function-like #define regexJune McEnroe 2019-02-18Match Tag in RustJune McEnroe 2019-02-18Match sh functions as TagJune McEnroe 2019-02-18Match Sh and Ss as Tag in mdocJune McEnroe 2019-02-18Match statics and typedefs as TagJune McEnroe 2019-02-18Clean up htmlHeaderJune McEnroe 2019-02-18Remove hi line numberingJune McEnroe 2019-02-18Add Tag class to hiJune McEnroe 2019-02-17Generate HTML with hi -n -f html -o anchorJune McEnroe 2019-02-17Add hi -f html -o anchor for line number linksJune McEnroe 2019-02-17Simplify temp trap in upJune McEnroe 2019-02-17Add line numbers to hiJune McEnroe 2019-02-17Always split spans after newlinesJune McEnroe 2019-02-15Color format specifiers light cyan in vimJune McEnroe 2019-02-15Highlight Interp as yellowJune McEnroe 2019-02-15Highlight strings in sh command substitutionsJune McEnroe 2019-02-15Add nmap gpJune McEnroe 2019-02-14Avoid newline when copying URL to pasteboardJune McEnroe 2019-02-13Add forgotten "sixth" book of H2G2June McEnroe