diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2022-08-27 17:20:27 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2022-08-27 17:32:12 +0200 |
commit | 190e813d4927c9321da69d96eb02d7e5dc1d97e7 (patch) | |
tree | 8fe98d39f5d27c17bfb319398ce2c2035420d6d4 | |
parent | 9af74259d2eb64229c25a3310b23a0c2d32c26eb (diff) | |
download | nncmpp-190e813d4927c9321da69d96eb02d7e5dc1d97e7.tar.gz nncmpp-190e813d4927c9321da69d96eb02d7e5dc1d97e7.tar.xz nncmpp-190e813d4927c9321da69d96eb02d7e5dc1d97e7.zip |
X11: fix Ctrl+Space
-rw-r--r-- | nncmpp.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -6061,8 +6061,14 @@ on_x11_keypress (XEvent *e) memcpy (k.multibyte, p, MIN (cp_len, sizeof k.multibyte - 1)); p += cp_len; - // This is unfortunate, but probably in the right place. - if (cp >= 32) + // This is all unfortunate, but probably in the right place. + if (!cp) + { + k.code.codepoint = ' '; + if (ev->state & ShiftMask) + k.modifiers |= TERMO_KEYMOD_SHIFT; + } + else if (cp >= 32) k.code.codepoint = cp; else if (ev->state & ShiftMask) k.code.codepoint = cp + 64; |