From: divverent Date: Mon, 6 Sep 2010 05:09:56 +0000 (+0000) Subject: Allow to type the utf8 Euro currency sign (to work around windows-1252 encoding) X-Git-Tag: xonotic-v0.1.0preview~246 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b5338c6d1a0b9f67074d1f1ba03797d28dce7ff2;p=xonotic%2Fdarkplaces.git Allow to type the utf8 Euro currency sign (to work around windows-1252 encoding) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10445 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=2521205903a3cab3b36f3450485a266a4e86085f --- diff --git a/keys.c b/keys.c index cb99dcad..3c09cf35 100644 --- 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)