mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
keys.c: Remove shift interpretation.
This never really belonged in keys.c (should have been handled in the backend instead), but now that we have separated Key_Event()/Char_Event() this no longer serves any purpose at all. git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1072 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
424fdc18c7
commit
020cdf139b
1 changed files with 0 additions and 43 deletions
|
@ -32,7 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
char key_lines[CMDLINES][MAXCMDLINE];
|
char key_lines[CMDLINES][MAXCMDLINE];
|
||||||
|
|
||||||
int key_linepos;
|
int key_linepos;
|
||||||
int shift_down=false;
|
|
||||||
int key_lastpress;
|
int key_lastpress;
|
||||||
int key_insert; //johnfitz -- insert key toggle (for editing)
|
int key_insert; //johnfitz -- insert key toggle (for editing)
|
||||||
double key_blinktime; //johnfitz -- fudge cursor blinking to make it easier to spot in certain cases
|
double key_blinktime; //johnfitz -- fudge cursor blinking to make it easier to spot in certain cases
|
||||||
|
@ -45,7 +44,6 @@ keydest_t key_dest;
|
||||||
int key_count; // incremented every key event
|
int key_count; // incremented every key event
|
||||||
|
|
||||||
char *keybindings[256];
|
char *keybindings[256];
|
||||||
int keyshift[256]; // key to map to if shift held down in console
|
|
||||||
int key_repeats[256]; // if > 1, it is autorepeating
|
int key_repeats[256]; // if > 1, it is autorepeating
|
||||||
qboolean consolekeys[256]; // if true, can't be rebound while in console
|
qboolean consolekeys[256]; // if true, can't be rebound while in console
|
||||||
qboolean menubound[256]; // if true, can't be rebound while in menu
|
qboolean menubound[256]; // if true, can't be rebound while in menu
|
||||||
|
@ -856,32 +854,6 @@ void Key_Init (void)
|
||||||
consolekeys['`'] = false;
|
consolekeys['`'] = false;
|
||||||
consolekeys['~'] = false;
|
consolekeys['~'] = false;
|
||||||
|
|
||||||
for (i = 0; i < 256; i++)
|
|
||||||
keyshift[i] = i;
|
|
||||||
for (i = 'a' ; i <= 'z'; i++)
|
|
||||||
keyshift[i] = i - 'a' + 'A';
|
|
||||||
keyshift['1'] = '!';
|
|
||||||
keyshift['2'] = '@';
|
|
||||||
keyshift['3'] = '#';
|
|
||||||
keyshift['4'] = '$';
|
|
||||||
keyshift['5'] = '%';
|
|
||||||
keyshift['6'] = '^';
|
|
||||||
keyshift['7'] = '&';
|
|
||||||
keyshift['8'] = '*';
|
|
||||||
keyshift['9'] = '(';
|
|
||||||
keyshift['0'] = ')';
|
|
||||||
keyshift['-'] = '_';
|
|
||||||
keyshift['='] = '+';
|
|
||||||
keyshift[','] = '<';
|
|
||||||
keyshift['.'] = '>';
|
|
||||||
keyshift['/'] = '?';
|
|
||||||
keyshift[';'] = ':';
|
|
||||||
keyshift['\''] = '"';
|
|
||||||
keyshift['['] = '{';
|
|
||||||
keyshift[']'] = '}';
|
|
||||||
keyshift['`'] = '~';
|
|
||||||
keyshift['\\'] = '|';
|
|
||||||
|
|
||||||
menubound[K_ESCAPE] = true;
|
menubound[K_ESCAPE] = true;
|
||||||
for (i = 0; i < 12; i++)
|
for (i = 0; i < 12; i++)
|
||||||
menubound[K_F1+i] = true;
|
menubound[K_F1+i] = true;
|
||||||
|
@ -934,9 +906,6 @@ void Key_Event (int key, qboolean down)
|
||||||
Con_Printf ("%s is unbound, hit F4 to set.\n", Key_KeynumToString(key));
|
Con_Printf ("%s is unbound, hit F4 to set.\n", Key_KeynumToString(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key == K_SHIFT)
|
|
||||||
shift_down = down;
|
|
||||||
|
|
||||||
// handle escape specialy, so the user can never unbind it
|
// handle escape specialy, so the user can never unbind it
|
||||||
if (key == K_ESCAPE)
|
if (key == K_ESCAPE)
|
||||||
{
|
{
|
||||||
|
@ -973,15 +942,6 @@ void Key_Event (int key, qboolean down)
|
||||||
sprintf (cmd, "-%s %i\n", kb+1, key);
|
sprintf (cmd, "-%s %i\n", kb+1, key);
|
||||||
Cbuf_AddText (cmd);
|
Cbuf_AddText (cmd);
|
||||||
}
|
}
|
||||||
if (keyshift[key] != key)
|
|
||||||
{
|
|
||||||
kb = keybindings[keyshift[key]];
|
|
||||||
if (kb && kb[0] == '+')
|
|
||||||
{
|
|
||||||
sprintf (cmd, "-%s %i\n", kb+1, key);
|
|
||||||
Cbuf_AddText (cmd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1017,9 +977,6 @@ void Key_Event (int key, qboolean down)
|
||||||
if (!down)
|
if (!down)
|
||||||
return; // other systems only care about key down events
|
return; // other systems only care about key down events
|
||||||
|
|
||||||
if (shift_down)
|
|
||||||
key = keyshift[key];
|
|
||||||
|
|
||||||
switch (key_dest)
|
switch (key_dest)
|
||||||
{
|
{
|
||||||
case key_message:
|
case key_message:
|
||||||
|
|
Loading…
Reference in a new issue