]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Allow to type the utf8 Euro currency sign (to work around windows-1252 encoding)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 6 Sep 2010 05:09:56 +0000 (05:09 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 6 Sep 2010 05:09:56 +0000 (05:09 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10445 d7cf8633-e32d-0410-b094-e92efae38249

keys.c

diff --git a/keys.c b/keys.c
index cb99dcad7c9938165754858cf24c4e2cc4bfe917..3c09cf3563e5d841ac3c306e55dda7e92d844fa6 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -1528,6 +1528,11 @@ Key_Event (int key, int ascii, qboolean down)
                return;
        }
 
+       if (ascii == 0x80 && utf8_enable.integer) // pressing AltGr-5 (or AltGr-e) and for some reason we get windows-1252 encoding?
+               ascii = 0x20AC; // we want the Euro currency sign
+               // TODO find out which vid_ drivers do it and fix it there
+               // but catching U+0080 here is no loss as that char is not useful anyway
+
        // get key binding
        bind = keybindings[key_bmap][key];
        if (!bind)