summaryrefslogtreecommitdiff
path: root/src/client/cl_keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/cl_keys.c')
-rw-r--r--src/client/cl_keys.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/cl_keys.c b/src/client/cl_keys.c
index c2cda2d6..71569fe5 100644
--- a/src/client/cl_keys.c
+++ b/src/client/cl_keys.c
@@ -1127,7 +1127,7 @@ void CL_KeyDownEvent( int key, unsigned time )
{
keys[key].down = qtrue;
keys[key].repeats++;
- if( keys[key].repeats == 1 )
+ if( keys[key].repeats == 1 && key != K_SCROLLOCK && key != K_KP_NUMLOCK && key != K_CAPSLOCK )
anykeydown++;
if( keys[K_ALT].down && key == K_ENTER )
@@ -1212,7 +1212,9 @@ void CL_KeyUpEvent( int key, unsigned time )
{
keys[key].repeats = 0;
keys[key].down = qfalse;
- anykeydown--;
+ if (key != K_SCROLLOCK && key != K_KP_NUMLOCK && key != K_CAPSLOCK)
+ anykeydown--;
+
if (anykeydown < 0) {
anykeydown = 0;
}
@@ -1293,6 +1295,9 @@ void Key_ClearStates (void)
anykeydown = 0;
for ( i=0 ; i < MAX_KEYS ; i++ ) {
+ if (i == K_SCROLLOCK || i == K_KP_NUMLOCK || i == K_CAPSLOCK)
+ continue;
+
if ( keys[i].down ) {
CL_KeyEvent( i, qfalse, 0 );