From: warp Date: Sun, 12 Oct 2003 05:45:42 +0000 (+0000) Subject: Tweak the key handling, may need more invasive changes. X-Git-Tag: xonotic-v0.1.0preview~6314 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=286592a0c2d7d2f5b3380a766eda627f61d3a7cd;p=xonotic%2Fdarkplaces.git Tweak the key handling, may need more invasive changes. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3579 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/vid_glx.c b/vid_glx.c index 4a5e0417..8b9c0281 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -112,9 +112,10 @@ static int XLateKey(XKeyEvent *ev) { int key = 0; char buf[64]; - KeySym keysym; + KeySym keysym, shifted; - XLookupString(ev, buf, sizeof buf, &keysym, 0); + keysym = XLookupKeysym (ev, 0); + XLookupString(ev, buf, sizeof buf, &shifted, 0); switch(keysym) { @@ -226,7 +227,7 @@ static int XLateKey(XKeyEvent *ev) #endif default: - key = *(unsigned char*)buf; + key = buf[0]; if (key >= 'A' && key <= 'Z') key = key - 'A' + 'a'; break;