diff options
author | tjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2007-02-14 23:29:19 +0000 |
---|---|---|
committer | tjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2007-02-14 23:29:19 +0000 |
commit | 03adf14fd0c16df0f674f1aa69fdbb45996328a4 (patch) | |
tree | 9b490525a86d15d67d4b25509d7ce958791a7705 /code/unix | |
parent | 4abb9b0b7511e62de9f548415b484ace2454a3ef (diff) | |
download | ioquake3-aero-03adf14fd0c16df0f674f1aa69fdbb45996328a4.tar.gz ioquake3-aero-03adf14fd0c16df0f674f1aa69fdbb45996328a4.zip |
* (bug 2741) Adds support in the SDL client for many keys that were not
recognized. For example, F13, F14, F15, WINDOWS, SCROLLLOCK, CAPSLOCK,
WORLD_0 - WORLD_95, etc. (Christophe Cavalaria)
* (bug 2741) Adds the hard-coded toggleConsole bind Shift-Escape
* (bug 2741) Adds detailed explaination of SDL keyboard handling differences
in the README file.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1044 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/unix')
-rw-r--r-- | code/unix/sdl_glimp.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/code/unix/sdl_glimp.c b/code/unix/sdl_glimp.c index 29108de..5640b70 100644 --- a/code/unix/sdl_glimp.c +++ b/code/unix/sdl_glimp.c @@ -225,6 +225,9 @@ static const char *XLateKey(SDL_keysym *keysym, int *key) case SDLK_F10: *key = K_F10; break; case SDLK_F11: *key = K_F11; break; case SDLK_F12: *key = K_F12; break; + case SDLK_F13: *key = K_F13; break; + case SDLK_F14: *key = K_F14; break; + case SDLK_F15: *key = K_F15; break; // bk001206 - from Ryan's Fakk2 case SDLK_BACKSPACE: *key = K_BACKSPACE; break; // ctrl-h @@ -243,15 +246,35 @@ static const char *XLateKey(SDL_keysym *keysym, int *key) case SDLK_RALT: case SDLK_LALT: *key = K_ALT; break; + case SDLK_LSUPER: + case SDLK_RSUPER: *key = K_SUPER; break; + case SDLK_KP5: *key = K_KP_5; break; case SDLK_INSERT: *key = K_INS; break; case SDLK_KP0: *key = K_KP_INS; break; - case SDLK_KP_MULTIPLY: *key = '*'; break; + case SDLK_KP_MULTIPLY: *key = K_KP_STAR; break; case SDLK_KP_PLUS: *key = K_KP_PLUS; break; case SDLK_KP_MINUS: *key = K_KP_MINUS; break; case SDLK_KP_DIVIDE: *key = K_KP_SLASH; break; - default: break; + case SDLK_MODE: *key = K_MODE; break; + case SDLK_COMPOSE: *key = K_COMPOSE; break; + case SDLK_HELP: *key = K_HELP; break; + case SDLK_PRINT: *key = K_PRINT; break; + case SDLK_SYSREQ: *key = K_SYSREQ; break; + case SDLK_BREAK: *key = K_BREAK; break; + case SDLK_MENU: *key = K_MENU; break; + case SDLK_POWER: *key = K_POWER; break; + case SDLK_EURO: *key = K_EURO; break; + case SDLK_UNDO: * key = K_UNDO; break; + case SDLK_SCROLLOCK: *key = K_SCROLLOCK; break; + case SDLK_NUMLOCK: *key = K_KP_NUMLOCK; break; + case SDLK_CAPSLOCK: *key = K_CAPSLOCK; break; + + default: + if (keysym->sym >= SDLK_WORLD_0 && keysym->sym <= SDLK_WORLD_95) + *key = (keysym->sym - SDLK_WORLD_0) + K_WORLD_0; + break; } if( keysym->unicode <= 127 ) // maps to ASCII? |