From 286592a0c2d7d2f5b3380a766eda627f61d3a7cd Mon Sep 17 00:00:00 2001 From: warp Date: Sun, 12 Oct 2003 05:45:42 +0000 Subject: [PATCH] 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 --- vid_glx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; -- 2.39.2