SDL 2 scroll/caps/num lock keys send KEYUP event when key is released
This commit is contained in:
parent
18e08125dd
commit
1d95ef210e
3 changed files with 2 additions and 25 deletions
|
@ -1207,7 +1207,7 @@ void CL_KeyDownEvent( int key, unsigned time )
|
|||
{
|
||||
keys[key].down = qtrue;
|
||||
keys[key].repeats++;
|
||||
if( keys[key].repeats == 1 && key != K_SCROLLOCK && key != K_KP_NUMLOCK && key != K_CAPSLOCK )
|
||||
if( keys[key].repeats == 1 )
|
||||
anykeydown++;
|
||||
|
||||
if( keys[K_ALT].down && key == K_ENTER )
|
||||
|
@ -1299,8 +1299,7 @@ void CL_KeyUpEvent( int key, unsigned time )
|
|||
{
|
||||
keys[key].repeats = 0;
|
||||
keys[key].down = qfalse;
|
||||
if (key != K_SCROLLOCK && key != K_KP_NUMLOCK && key != K_CAPSLOCK)
|
||||
anykeydown--;
|
||||
anykeydown--;
|
||||
|
||||
if (anykeydown < 0) {
|
||||
anykeydown = 0;
|
||||
|
@ -1385,9 +1384,6 @@ 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 );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue