From 190e813d4927c9321da69d96eb02d7e5dc1d97e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Sat, 27 Aug 2022 17:20:27 +0200 Subject: X11: fix Ctrl+Space --- nncmpp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nncmpp.c b/nncmpp.c index 5fa6d99..ec8a735 100644 --- a/nncmpp.c +++ b/nncmpp.c @@ -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; -- cgit v1.2.3