From 2521205903a3cab3b36f3450485a266a4e86085f Mon Sep 17 00:00:00 2001 From: divverent Date: Mon, 6 Sep 2010 05:09:56 +0000 Subject: [PATCH] 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 --- keys.c | 5 +++++ 1 file changed, 5 insertions(+) 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) -- 2.39.2