* Revert 'Handle dead keys more gracefully by taking a "best guess" rather than

ignoring completely' from r1459; it can't ever work acceptably, especially on
  azerty/qwertz layouts
* Make the ordering of the output from in_keyboardDebug more sensible
* Add cl_consoleKeys cvar, a space delimited list of key names or characters
  that toggle the console
This commit is contained in:
Tim Angus 2008-08-28 22:05:34 +00:00
parent f1faa1d12a
commit c0328ab4f6
6 changed files with 122 additions and 56 deletions

View file

@ -1172,7 +1172,7 @@ void CL_KeyEvent (int key, qboolean down, unsigned time) {
}
// console key is hardcoded, so the user can never unbind it
if (key == '`' || key == '~' ||
if (key == K_CONSOLE ||
( key == K_ESCAPE && keys[K_SHIFT].down ) ) {
if (!down) {
return;
@ -1315,11 +1315,6 @@ Normal keyboard characters, already shifted / capslocked / etc
===================
*/
void CL_CharEvent( int key ) {
// the console key should never be used as a char
if ( key == '`' || key == '~' ) {
return;
}
// delete is not a printable character and is
// otherwise handled by Field_KeyDownEvent
if ( key == 127 ) {

View file

@ -96,6 +96,8 @@ cvar_t *cl_lanForcePackets;
cvar_t *cl_guidServerUniq;
cvar_t *cl_consoleKeys;
clientActive_t cl;
clientConnection_t clc;
clientStatic_t cls;
@ -3065,6 +3067,9 @@ void CL_Init( void ) {
cl_guidServerUniq = Cvar_Get ("cl_guidServerUniq", "1", CVAR_ARCHIVE);
// 0x7e = ~ and 0x60 = `
cl_consoleKeys = Cvar_Get( "cl_consoleKeys", "0x7e 0x60", CVAR_ARCHIVE);
// userinfo
Cvar_Get ("name", "UnnamedPlayer", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("rate", "3000", CVAR_USERINFO | CVAR_ARCHIVE );

View file

@ -401,6 +401,8 @@ extern cvar_t *cl_inGameVideo;
extern cvar_t *cl_lanForcePackets;
extern cvar_t *cl_autoRecordDemo;
extern cvar_t *cl_consoleKeys;
#ifdef USE_MUMBLE
extern cvar_t *cl_useMumble;
extern cvar_t *cl_mumbleScale;
@ -489,6 +491,7 @@ void IN_CenterView (void);
void CL_VerifyCode( void );
float CL_KeyState (kbutton_t *key);
int Key_StringToKeynum( char *str );
char *Key_KeynumToString (int keynum);
//

View file

@ -260,6 +260,9 @@ typedef enum {
K_EURO,
K_UNDO,
// Pseudo-key that brings the console down
K_CONSOLE,
MAX_KEYS
} keyNum_t;