]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
make ctrl-key shortcuts in message mode display chars from the charmap even with...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 6 Sep 2010 05:09:53 +0000 (05:09 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 6 Sep 2010 05:09:53 +0000 (05:09 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10444 d7cf8633-e32d-0410-b094-e92efae38249

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