]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - keys.c
make ctrl-key shortcuts in message mode display chars from the charmap even with...
[xonotic/darkplaces.git] / keys.c
diff --git a/keys.c b/keys.c
index 478e8a168c9be3df832a532350054416037fe5bd..cb99dcad7c9938165754858cf24c4e2cc4bfe917 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -1011,6 +1011,10 @@ Key_Message (int key, int ascii)
                return;
        }
 
+       // ctrl+key generates an ascii value < 32 and shows a char from the charmap
+       if (ascii < 32 && utf8_enable.integer)
+               ascii = 0xE000 + ascii;
+
        if (chat_bufferlen == sizeof (chat_buffer) - 1)
                return;                                                 // all full