aboutsummaryrefslogtreecommitdiffstats
path: root/code/unix
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-02-04 14:11:53 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-02-04 14:11:53 +0000
commitf60eeadfed24cb66eb745db1313b70f1a28c1472 (patch)
tree90d8dc596057be71a9c57172cf66e028a1758813 /code/unix
parentd6d5e0c117c68b79558dcab9f09f7ef10142d836 (diff)
downloadioquake3-aero-f60eeadfed24cb66eb745db1313b70f1a28c1472.tar.gz
ioquake3-aero-f60eeadfed24cb66eb745db1313b70f1a28c1472.zip
* Do not cull non-ascii keyboard chars at the SDL level any more, these are
handled in cl_keys.c. (This fixes ctrl-c not working). git-svn-id: svn://svn.icculus.org/quake3/trunk@532 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/unix')
-rw-r--r--code/unix/sdl_glimp.c33
1 files changed, 13 insertions, 20 deletions
diff --git a/code/unix/sdl_glimp.c b/code/unix/sdl_glimp.c
index db77e14..8ad6867 100644
--- a/code/unix/sdl_glimp.c
+++ b/code/unix/sdl_glimp.c
@@ -252,27 +252,20 @@ static const char *XLateKey(SDL_keysym *keysym, int *key)
default: break;
}
- if (*key == K_BACKSPACE)
- buf[0] = 8;
- else
+ if( keysym->unicode <= 127 ) // maps to ASCII?
{
- if (keysym->unicode <= 255 && keysym->unicode >= 20) // maps to ASCII?
- {
- char ch = (char) keysym->unicode;
- if (ch == '~')
- *key = '~'; // console HACK
-
- // The X11 driver converts to lowercase, but apparently we shouldn't.
- // There's possibly somewhere else where they covert back. Passing
- // uppercase to the engine works fine and fixes all-lower input.
- // (https://bugzilla.icculus.org/show_bug.cgi?id=2364) --ryan.
- //else if (ch >= 'A' && ch <= 'Z')
- // ch = ch - 'A' + 'a';
-
- buf[0] = ch;
- }
- else if(keysym->unicode == 8) // ctrl-h
- buf[0] = 8;
+ char ch = (char) keysym->unicode;
+ if (ch == '~')
+ *key = '~'; // console HACK
+
+ // The X11 driver converts to lowercase, but apparently we shouldn't.
+ // There's possibly somewhere else where they covert back. Passing
+ // uppercase to the engine works fine and fixes all-lower input.
+ // (https://bugzilla.icculus.org/show_bug.cgi?id=2364) --ryan.
+ //else if (ch >= 'A' && ch <= 'Z')
+ // ch = ch - 'A' + 'a';
+
+ buf[0] = ch;
}
return buf;