mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
input: Remove some of stuff obsoleted by r1110.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1112 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
3cb6f871f1
commit
13cfd00787
2 changed files with 23 additions and 58 deletions
|
@ -562,27 +562,6 @@ static inline int IN_SDL2_ScancodeToQuakeKey(SDL_Scancode scancode)
|
|||
}
|
||||
#endif
|
||||
|
||||
static inline qboolean IN_NumpadKey (int key)
|
||||
{
|
||||
switch (key)
|
||||
{
|
||||
case K_KP_HOME:
|
||||
case K_KP_UPARROW:
|
||||
case K_KP_PGUP:
|
||||
case K_KP_LEFTARROW:
|
||||
case K_KP_5:
|
||||
case K_KP_RIGHTARROW:
|
||||
case K_KP_END:
|
||||
case K_KP_DOWNARROW:
|
||||
case K_KP_PGDN:
|
||||
case K_KP_INS:
|
||||
case K_KP_DEL:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void IN_SendKeyEvents (void)
|
||||
{
|
||||
SDL_Event event;
|
||||
|
@ -659,6 +638,7 @@ void IN_SendKeyEvents (void)
|
|||
Char_Event (event.key.keysym.unicode);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case SDL_MOUSEBUTTONDOWN:
|
||||
case SDL_MOUSEBUTTONUP:
|
||||
if (event.button.button < 1 ||
|
||||
|
|
59
Quake/keys.c
59
Quake/keys.c
|
@ -43,7 +43,6 @@ keydest_t key_dest;
|
|||
#define MAX_KEYS 256
|
||||
|
||||
char *keybindings[MAX_KEYS];
|
||||
qboolean specialkeys[MAX_KEYS]; // if true, hardcoded for console/menu navigation etc.
|
||||
qboolean consolekeys[MAX_KEYS]; // if true, can't be rebound while in console
|
||||
qboolean menubound[MAX_KEYS]; // if true, can't be rebound while in menu
|
||||
qboolean keydown[MAX_KEYS];
|
||||
|
@ -810,49 +809,30 @@ void Key_Init (void)
|
|||
|
||||
key_blinktime = realtime; //johnfitz
|
||||
|
||||
//
|
||||
// initialize specialkeys[]
|
||||
//
|
||||
specialkeys[K_TAB] = true;
|
||||
specialkeys[K_ENTER] = true;
|
||||
specialkeys[K_ESCAPE] = true;
|
||||
specialkeys[K_BACKSPACE] = true;
|
||||
specialkeys[K_UPARROW] = true;
|
||||
specialkeys[K_DOWNARROW] = true;
|
||||
specialkeys[K_LEFTARROW] = true;
|
||||
specialkeys[K_RIGHTARROW] = true;
|
||||
specialkeys[K_ALT] = true;
|
||||
specialkeys[K_CTRL] = true;
|
||||
specialkeys[K_SHIFT] = true;
|
||||
specialkeys[K_INS] = true;
|
||||
specialkeys[K_DEL] = true;
|
||||
specialkeys[K_PGDN] = true;
|
||||
specialkeys[K_PGUP] = true;
|
||||
specialkeys[K_HOME] = true;
|
||||
specialkeys[K_END] = true;
|
||||
specialkeys[K_KP_HOME] = true;
|
||||
specialkeys[K_KP_UPARROW] = true;
|
||||
specialkeys[K_KP_PGUP] = true;
|
||||
specialkeys[K_KP_LEFTARROW] = true;
|
||||
specialkeys[K_KP_RIGHTARROW] = true;
|
||||
specialkeys[K_KP_END] = true;
|
||||
specialkeys[K_KP_DOWNARROW] = true;
|
||||
specialkeys[K_KP_PGDN] = true;
|
||||
specialkeys[K_KP_ENTER] = true;
|
||||
specialkeys[K_KP_INS] = true;
|
||||
specialkeys[K_KP_DEL] = true;
|
||||
specialkeys[K_COMMAND] = true;
|
||||
specialkeys[K_MWHEELUP] = true;
|
||||
specialkeys[K_MWHEELDOWN] = true;
|
||||
|
||||
//
|
||||
// initialize consolekeys[]
|
||||
//
|
||||
memcpy(consolekeys, specialkeys, MAX_KEYS * sizeof(qboolean));
|
||||
for (i = 32; i < 127; i++) // ascii characters
|
||||
consolekeys[i] = true;
|
||||
consolekeys['`'] = false;
|
||||
consolekeys['~'] = false;
|
||||
consolekeys[K_TAB] = true;
|
||||
consolekeys[K_ENTER] = true;
|
||||
consolekeys[K_ESCAPE] = true;
|
||||
consolekeys[K_BACKSPACE] = true;
|
||||
consolekeys[K_UPARROW] = true;
|
||||
consolekeys[K_DOWNARROW] = true;
|
||||
consolekeys[K_LEFTARROW] = true;
|
||||
consolekeys[K_RIGHTARROW] = true;
|
||||
consolekeys[K_ALT] = true;
|
||||
consolekeys[K_CTRL] = true;
|
||||
consolekeys[K_SHIFT] = true;
|
||||
consolekeys[K_INS] = true;
|
||||
consolekeys[K_DEL] = true;
|
||||
consolekeys[K_PGDN] = true;
|
||||
consolekeys[K_PGUP] = true;
|
||||
consolekeys[K_HOME] = true;
|
||||
consolekeys[K_END] = true;
|
||||
consolekeys[K_KP_NUMLOCK] = true;
|
||||
consolekeys[K_KP_SLASH] = true;
|
||||
consolekeys[K_KP_STAR] = true;
|
||||
|
@ -870,6 +850,11 @@ void Key_Init (void)
|
|||
consolekeys[K_KP_ENTER] = true;
|
||||
consolekeys[K_KP_INS] = true;
|
||||
consolekeys[K_KP_DEL] = true;
|
||||
#if defined(PLATFORM_OSX) || defined(PLATFORM_MAC)
|
||||
consolekeys[K_COMMAND] = true;
|
||||
#endif
|
||||
consolekeys[K_MWHEELUP] = true;
|
||||
consolekeys[K_MWHEELDOWN] = true;
|
||||
|
||||
//
|
||||
// initialize menubound[]
|
||||
|
|
Loading…
Reference in a new issue