summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2009-10-03 11:59:51 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:35 +0000
commit8e412322448053080c00a67f92fda4de183df7fa (patch)
tree007c8e8ba9c6bc39869bd2a3c433bc53e0f7e6d1 /src/client
parente28bdd7b296c0028aaa63ee1feb027c2f0ebde51 (diff)
* Merge ioq3-r1464
* Use WM cursor when running windowed and UI module has input
Diffstat (limited to 'src/client')
-rw-r--r--src/client/cl_keys.c7
-rw-r--r--src/client/cl_main.c5
-rw-r--r--src/client/client.h3
-rw-r--r--src/client/keycodes.h3
4 files changed, 12 insertions, 6 deletions
diff --git a/src/client/cl_keys.c b/src/client/cl_keys.c
index 8b9dcf4d..ee075ce5 100644
--- a/src/client/cl_keys.c
+++ b/src/client/cl_keys.c
@@ -1124,7 +1124,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;
@@ -1259,11 +1259,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 ) {
diff --git a/src/client/cl_main.c b/src/client/cl_main.c
index 0bba97d0..f91c80b2 100644
--- a/src/client/cl_main.c
+++ b/src/client/cl_main.c
@@ -97,6 +97,8 @@ cvar_t *cl_lanForcePackets;
cvar_t *cl_guidServerUniq;
+cvar_t *cl_consoleKeys;
+
clientActive_t cl;
clientConnection_t clc;
clientStatic_t cls;
@@ -3016,6 +3018,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", Sys_GetCurrentUser( ), CVAR_USERINFO | CVAR_ARCHIVE );
diff --git a/src/client/client.h b/src/client/client.h
index d7f430cb..f19c6230 100644
--- a/src/client/client.h
+++ b/src/client/client.h
@@ -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);
//
diff --git a/src/client/keycodes.h b/src/client/keycodes.h
index ae6f189d..8911b0fc 100644
--- a/src/client/keycodes.h
+++ b/src/client/keycodes.h
@@ -262,6 +262,9 @@ typedef enum {
K_EURO,
K_UNDO,
+ // Pseudo-key that brings the console down
+ K_CONSOLE,
+
MAX_KEYS
} keyNum_t;