2001-04-15 04:18:22 +00:00
|
|
|
/*
|
|
|
|
in_sdl.c
|
|
|
|
|
|
|
|
general sdl input driver
|
|
|
|
|
|
|
|
Copyright (C) 1996-1997 Id Software, Inc.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to:
|
|
|
|
|
|
|
|
Free Software Foundation, Inc.
|
|
|
|
59 Temple Place - Suite 330
|
|
|
|
Boston, MA 02111-1307, USA
|
|
|
|
|
|
|
|
*/
|
2001-09-28 06:26:31 +00:00
|
|
|
static const char rcsid[] =
|
|
|
|
"$Id$";
|
2001-04-15 04:18:22 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
|
|
|
|
#include "QF/console.h"
|
|
|
|
#include "QF/cvar.h"
|
|
|
|
#include "QF/input.h"
|
|
|
|
#include "QF/joystick.h"
|
|
|
|
#include "QF/keys.h"
|
2001-04-16 03:55:44 +00:00
|
|
|
#include "QF/mathlib.h"
|
2001-04-15 04:18:22 +00:00
|
|
|
#include "QF/qargs.h"
|
|
|
|
#include "QF/qendian.h"
|
2001-08-27 01:00:03 +00:00
|
|
|
#include "QF/sys.h"
|
2001-04-16 03:55:44 +00:00
|
|
|
#include "QF/vid.h"
|
2001-04-15 04:18:22 +00:00
|
|
|
|
2001-08-27 01:00:03 +00:00
|
|
|
#include "compat.h"
|
|
|
|
|
|
|
|
int old_windowed_mouse;
|
2001-04-15 04:18:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
void
|
2001-04-16 03:55:44 +00:00
|
|
|
IN_LL_SendKeyEvents (void)
|
2001-04-15 04:18:22 +00:00
|
|
|
{
|
|
|
|
SDL_Event event;
|
|
|
|
int sym, state, but;
|
2001-08-16 09:19:36 +00:00
|
|
|
knum_t ksym;
|
|
|
|
short unicode;
|
2001-04-15 04:18:22 +00:00
|
|
|
|
|
|
|
while (SDL_PollEvent (&event)) {
|
|
|
|
switch (event.type) {
|
|
|
|
case SDL_KEYDOWN:
|
|
|
|
case SDL_KEYUP:
|
|
|
|
sym = event.key.keysym.sym;
|
|
|
|
state = event.key.state;
|
2001-08-16 09:19:36 +00:00
|
|
|
unicode = event.key.keysym.unicode;
|
2001-04-15 04:18:22 +00:00
|
|
|
switch (sym) {
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_UNKNOWN:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_UNKNOWN;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_BACKSPACE:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_BACKSPACE;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_TAB:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_TAB;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_CLEAR:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_CLEAR;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_RETURN:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_RETURN;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_PAUSE:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_PAUSE;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_ESCAPE:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_ESCAPE;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_SPACE:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_SPACE;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_EXCLAIM:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_EXCLAIM;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_QUOTEDBL:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_QUOTEDBL;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_HASH:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_HASH;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_DOLLAR:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_DOLLAR;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_AMPERSAND:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_AMPERSAND;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_QUOTE:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_QUOTE;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_LEFTPAREN:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_LEFTPAREN;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_RIGHTPAREN:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_RIGHTPAREN;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_ASTERISK:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_ASTERISK;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_PLUS:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_PLUS;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_COMMA:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_COMMA;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_MINUS:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_MINUS;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_PERIOD:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_PERIOD;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_SLASH:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_SLASH;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_0:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_0;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_1:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_1;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_2:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_2;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_3:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_3;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_4:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_4;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
2001-08-16 09:19:36 +00:00
|
|
|
case SDLK_5:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_5;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_6:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_6;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_7:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_7;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_8:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_8;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_9:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_9;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_COLON:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_COLON;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_SEMICOLON:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_SEMICOLON;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_LESS:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_LESS;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_EQUALS:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_EQUALS;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_GREATER:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_GREATER;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_QUESTION:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_QUESTION;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_AT:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_AT;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_LEFTBRACKET:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_LEFTBRACKET;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_BACKSLASH:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_BACKSLASH;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_RIGHTBRACKET:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_RIGHTBRACKET;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_CARET:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_CARET;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_UNDERSCORE:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_UNDERSCORE;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_BACKQUOTE:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_BACKQUOTE;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_a:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_a;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_b:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_b;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_c:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_c;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_d:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_d;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_e:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_e;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_f:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_f;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_g:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_g;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_h:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_h;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_i:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_i;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_j:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_j;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_k:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_k;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_l:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_l;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_m:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_m;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_n:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_n;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_o:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_o;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_p:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_p;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_q:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_q;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_r:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_r;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_s:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_s;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_t:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_t;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_u:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_u;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_v:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_v;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_w:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_w;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_x:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_x;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_y:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_y;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_z:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_z;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_DELETE:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_DELETE;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_0:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_0;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_1:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_1;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_2:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_2;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_3:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_3;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_4:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_4;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_5:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_5;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_6:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_6;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_7:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_7;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_8:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_8;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_9:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_9;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_10:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_10;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_11:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_11;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_12:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_12;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_13:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_13;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_14:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_14;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_15:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_15;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_16:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_16;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_17:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_17;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_18:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_18;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_19:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_19;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_20:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_20;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_21:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_21;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_22:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_22;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_23:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_23;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_24:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_24;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_25:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_25;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_26:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_26;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_27:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_27;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_28:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_28;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_29:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_29;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_30:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_30;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_31:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_31;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_32:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_32;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_33:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_33;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_34:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_34;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_35:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_35;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_36:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_36;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_37:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_37;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_38:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_38;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_39:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_39;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_40:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_40;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_41:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_41;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_42:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_42;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_43:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_43;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_44:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_44;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_45:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_45;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_46:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_46;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_47:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_47;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_48:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_48;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_49:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_49;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_50:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_50;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_51:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_51;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_52:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_52;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_53:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_53;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_54:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_54;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_55:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_55;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_56:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_56;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_57:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_57;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_58:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_58;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_59:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_59;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_60:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_60;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_61:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_61;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_62:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_62;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_63:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_63;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_64:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_64;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_65:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_65;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_66:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_66;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_67:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_67;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_68:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_68;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_69:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_69;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_70:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_70;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_71:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_71;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_72:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_72;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_73:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_73;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_74:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_74;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_75:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_75;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_76:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_76;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_77:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_77;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_78:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_78;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_79:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_79;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_80:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_80;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_81:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_81;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_82:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_82;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_83:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_83;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_84:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_84;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_85:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_85;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_86:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_86;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_87:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_87;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_88:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_88;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_89:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_89;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_90:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_90;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_91:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_91;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_92:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_92;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_93:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_93;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_94:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_94;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_WORLD_95:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_WORLD_95;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP0:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP0;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP1:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP1;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP2:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP2;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP3:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP3;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP4:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP4;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP5:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP5;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP6:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP6;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP7:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP7;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP8:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP8;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP9:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP9;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP_PERIOD:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP_PERIOD;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP_DIVIDE:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP_DIVIDE;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP_MULTIPLY:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP_MULTIPLY;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP_MINUS:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP_MINUS;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP_PLUS:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP_PLUS;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP_ENTER:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP_ENTER;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case SDLK_KP_EQUALS:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_KP_EQUALS;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_UP:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_UP;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_DOWN:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_DOWN;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_RIGHT:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_RIGHT;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_LEFT:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_LEFT;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_INSERT:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_INSERT;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_HOME:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_HOME;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_END:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_END;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_PAGEUP:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_PAGEUP;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_PAGEDOWN:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_PAGEDOWN;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F1:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F1;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F2:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F2;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F3:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F3;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F4:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F4;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F5:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F5;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F6:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F6;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F7:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F7;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F8:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F8;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F9:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F9;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F10:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F10;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F11:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F11;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F12:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F12;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F13:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F13;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F14:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F14;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_F15:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_F15;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_NUMLOCK:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_NUMLOCK;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_CAPSLOCK:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_CAPSLOCK;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_SCROLLOCK:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_SCROLLOCK;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_RSHIFT:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_RSHIFT;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_LSHIFT:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_LSHIFT;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_RCTRL:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_RCTRL;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_LCTRL:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_LCTRL;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_RALT:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_RALT;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_LALT:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_LALT;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_RMETA:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_RMETA;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_LMETA:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_LMETA;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_LSUPER:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_LSUPER;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_RSUPER:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_RSUPER;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_MODE:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_MODE;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_COMPOSE:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_COMPOSE;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_HELP:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_HELP;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_PRINT:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_PRINT;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_SYSREQ:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_SYSREQ;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_BREAK:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_BREAK;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_MENU:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_MENU;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_POWER:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_POWER;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_EURO:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_EURO;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
case SDLK_LAST:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_LAST;
|
2001-08-16 09:19:36 +00:00
|
|
|
break;
|
|
|
|
default:
|
2001-10-28 04:23:37 +00:00
|
|
|
ksym = QFK_UNKNOWN;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
}
|
2001-08-16 09:19:36 +00:00
|
|
|
if (unicode > 255)
|
|
|
|
unicode = 0;
|
|
|
|
Key_Event (sym, unicode, state);
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SDL_MOUSEBUTTONDOWN:
|
|
|
|
case SDL_MOUSEBUTTONUP:
|
|
|
|
but = event.button.button;
|
|
|
|
if (but == 2)
|
|
|
|
but = 3;
|
|
|
|
else if (but == 3)
|
|
|
|
but = 2;
|
|
|
|
|
|
|
|
switch (but) {
|
|
|
|
case 1:
|
|
|
|
case 2:
|
|
|
|
case 3:
|
2001-10-28 04:23:37 +00:00
|
|
|
Key_Event (QFM_BUTTON1 + but - 1, 0,
|
2001-08-16 09:19:36 +00:00
|
|
|
event.type == SDL_MOUSEBUTTONDOWN);
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case 4:
|
2001-10-28 04:23:37 +00:00
|
|
|
Key_Event (QFM_WHEEL_UP, 0, true);
|
|
|
|
Key_Event (QFM_WHEEL_UP, 0, false);
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
case 5:
|
2001-10-28 04:23:37 +00:00
|
|
|
Key_Event (QFM_WHEEL_DOWN, 0, true);
|
|
|
|
Key_Event (QFM_WHEEL_DOWN, 0, false);
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SDL_MOUSEMOTION:
|
2001-08-06 00:16:48 +00:00
|
|
|
in_mouse_x += event.motion.xrel;
|
|
|
|
in_mouse_y += event.motion.yrel;
|
2001-04-15 04:18:22 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case SDL_QUIT:
|
2002-08-21 00:05:27 +00:00
|
|
|
// CL_Disconnect ();
|
2001-04-15 04:18:22 +00:00
|
|
|
Sys_Quit ();
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-08-30 20:04:13 +00:00
|
|
|
void
|
|
|
|
IN_LL_Grab_Input (void)
|
|
|
|
{
|
|
|
|
SDL_WM_GrabInput (SDL_GRAB_ON);
|
|
|
|
SDL_ShowCursor (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
IN_LL_Ungrab_Input (void)
|
|
|
|
{
|
|
|
|
SDL_ShowCursor (1);
|
|
|
|
SDL_WM_GrabInput (SDL_GRAB_OFF);
|
2001-04-15 04:18:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-04-16 03:55:44 +00:00
|
|
|
IN_LL_Init (void)
|
2001-04-15 04:18:22 +00:00
|
|
|
{
|
2002-08-21 00:05:27 +00:00
|
|
|
// Enable UNICODE translation for keyboard input
|
2001-08-16 09:19:36 +00:00
|
|
|
SDL_EnableUNICODE(1);
|
|
|
|
|
2001-08-30 20:04:13 +00:00
|
|
|
if (COM_CheckParm ("-nomouse") && !in_grab->value)
|
2001-04-15 04:18:22 +00:00
|
|
|
return;
|
|
|
|
|
2001-04-16 03:55:44 +00:00
|
|
|
in_mouse_x = in_mouse_y = 0.0;
|
|
|
|
in_mouse_avail = 1;
|
2001-04-15 04:18:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-04-16 03:55:44 +00:00
|
|
|
IN_LL_Init_Cvars (void)
|
2001-04-15 04:18:22 +00:00
|
|
|
{
|
2002-08-21 00:05:27 +00:00
|
|
|
// in_snd_block = Cvar_Get ("in_snd_block", "0", CVAR_ARCHIVE, NULL,
|
|
|
|
// "block sound output on window focus loss");
|
2001-04-15 04:18:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2001-04-16 03:55:44 +00:00
|
|
|
IN_LL_Shutdown (void)
|
2001-04-15 04:18:22 +00:00
|
|
|
{
|
2001-04-16 03:55:44 +00:00
|
|
|
in_mouse_avail = 0;
|
2001-04-15 04:18:22 +00:00
|
|
|
}
|
|
|
|
|
2001-04-17 15:55:33 +00:00
|
|
|
void
|
|
|
|
IN_LL_ClearStates (void)
|
|
|
|
{
|
|
|
|
}
|