MCPcopy Create free account
hub / github.com/JACoders/OpenJK / CL_KeyUpEvent

Function CL_KeyUpEvent

code/client/cl_keys.cpp:1293–1318  ·  view source on GitHub ↗

=================== CL_KeyUpEvent Called by CL_KeyEvent to handle a keyrelease =================== */

Source from the content-addressed store, hash-verified

1291===================
1292*/
1293void CL_KeyUpEvent( int key, unsigned time )
1294{
1295 kg.keys[keynames[key].upper].repeats = 0;
1296 kg.keys[keynames[key].upper].down = qfalse;
1297 kg.keyDownCount--;
1298
1299 if (kg.keyDownCount <= 0) {
1300 kg.anykeydown = qfalse;
1301 kg.keyDownCount = 0;
1302 }
1303
1304 // don't process key-up events for the console key
1305 if ( key == A_CONSOLE || ( key == A_ESCAPE && kg.keys[A_SHIFT].down ) )
1306 return;
1307
1308 //
1309 // key up events only perform actions if the game key binding is
1310 // a button command (leading + sign). These will be processed even in
1311 // console mode and menu mode, to keep the character from continuing
1312 // an action started before a mode switch.
1313 //
1314 CL_ParseBinding( key, qfalse, time );
1315
1316 if ( Key_GetCatcher( ) & KEYCATCH_UI )
1317 _UI_KeyEvent( key, qfalse );
1318}
1319
1320/*
1321===================

Callers 1

CL_KeyEventFunction · 0.70

Calls 3

_UI_KeyEventFunction · 0.85
CL_ParseBindingFunction · 0.70
Key_GetCatcherFunction · 0.70

Tested by

no test coverage detected