Quake II RTX doxygen  1.0 dev
keys.c File Reference
#include "client.h"

Go to the source code of this file.

Classes

struct  keyname_s
 

Macros

#define K(x)   { #x, K_##x }
 
#define K(x)   Q_SetBit(consolekeys, K_##x)
 

Typedefs

typedef struct keyname_s keyname_t
 

Functions

qboolean Key_GetOverstrikeMode (void)
 
void Key_SetOverstrikeMode (qboolean overstrike)
 
keydest_t Key_GetDest (void)
 
void Key_SetDest (keydest_t dest)
 
int Key_IsDown (int key)
 
int Key_AnyKeyDown (void)
 
int Key_StringToKeynum (const char *str)
 
char * Key_KeynumToString (int keynum)
 
char * Key_GetBinding (const char *binding)
 
char * Key_GetBindingForKey (int keynum)
 
int Key_EnumBindings (int key, const char *binding)
 
void Key_SetBinding (int keynum, const char *binding)
 
static void Key_Name_g (genctx_t *ctx)
 
static void Key_Bound_g (genctx_t *ctx)
 
static void Key_Bind_c (genctx_t *ctx, int argnum)
 
static void Key_Unbind_c (genctx_t *ctx, int argnum)
 
static void Key_Unbind_f (void)
 
static void Key_Unbindall_f (void)
 
static void Key_Bind_f (void)
 
void Key_WriteBindings (qhandle_t f)
 
static void Key_Bindlist_f (void)
 
void Key_Init (void)
 
void Key_Event (unsigned key, qboolean down, unsigned time)
 
void Key_ClearStates (void)
 
void Key_WaitKey (keywaitcb_t wait, void *arg)
 

Variables

static keywaitcb_t key_wait_cb
 
static voidkey_wait_arg
 
static char * keybindings [256]
 
static byte consolekeys [256/8]
 
static byte keyshift [256]
 
static byte keydown [256]
 
static int anykeydown
 
static byte buttondown [256/8]
 
static qboolean key_overstrike
 
static const keyname_t keynames []
 
static cmdreg_t c_keys []
 

Macro Definition Documentation

◆ K [1/2]

#define K (   x)    { #x, K_##x }

Definition at line 48 of file keys.c.

◆ K [2/2]

#define K (   x)    Q_SetBit(consolekeys, K_##x)

Definition at line 48 of file keys.c.

Typedef Documentation

◆ keyname_t

typedef struct keyname_s keyname_t

Function Documentation

◆ Key_AnyKeyDown()

int Key_AnyKeyDown ( void  )

Definition at line 220 of file keys.c.

221 {
222  return anykeydown;
223 }

Referenced by CL_FinalizeCmd().

◆ Key_Bind_c()

static void Key_Bind_c ( genctx_t *  ctx,
int  argnum 
)
static

Definition at line 381 of file keys.c.

382 {
383  if (argnum == 1) {
384  Key_Name_g(ctx);
385  } else {
386  Com_Generic_c(ctx, argnum - 2);
387  }
388 }

◆ Key_Bind_f()

static void Key_Bind_f ( void  )
static

Definition at line 440 of file keys.c.

441 {
442  int c, b;
443 
444  c = Cmd_Argc();
445 
446  if (c < 2) {
447  Com_Printf("bind <key> [command] : attach a command to a key\n");
448  return;
449  }
451  if (b == -1) {
452  Com_Printf("\"%s\" isn't a valid key\n", Cmd_Argv(1));
453  return;
454  }
455 
456  if (c == 2) {
457  if (keybindings[b])
458  Com_Printf("\"%s\" = \"%s\"\n", Cmd_Argv(1), keybindings[b]);
459  else
460  Com_Printf("\"%s\" is not bound\n", Cmd_Argv(1));
461  return;
462  }
463 
464 // copy the rest of the command line
466 }

◆ Key_Bindlist_f()

static void Key_Bindlist_f ( void  )
static

Definition at line 494 of file keys.c.

495 {
496  int i;
497 
498  for (i = 0; i < 256; i++) {
499  if (keybindings[i] && keybindings[i][0]) {
500  Com_Printf("%s \"%s\"\n", Key_KeynumToString(i),
501  keybindings[i]);
502  }
503  }
504 }

◆ Key_Bound_g()

static void Key_Bound_g ( genctx_t *  ctx)
static

Definition at line 367 of file keys.c.

368 {
369  int i;
370 
371  ctx->ignorecase = qtrue;
372  for (i = 0; i < 256; i++) {
373  if (keybindings[i]) {
374  if (!Prompt_AddMatch(ctx, Key_KeynumToString(i))) {
375  break;
376  }
377  }
378  }
379 }

Referenced by Key_Unbind_c().

◆ Key_ClearStates()

void Key_ClearStates ( void  )

Definition at line 875 of file keys.c.

876 {
877  int i;
878 
879  // hack for menu key binding
880  if (key_wait_cb) {
881  key_wait_cb(key_wait_arg, K_ESCAPE);
882  key_wait_cb = NULL;
883  }
884 
885  for (i = 0; i < 256; i++) {
886  if (keydown[i])
887  Key_Event(i, qfalse, com_eventTime);
888  }
889 
890  memset(buttondown, 0, sizeof(buttondown));
891  anykeydown = 0;
892 }

Referenced by CL_Activate().

◆ Key_EnumBindings()

int Key_EnumBindings ( int  key,
const char *  binding 
)

Definition at line 320 of file keys.c.

321 {
322  if (key < 0) {
323  key = 0;
324  }
325  for (; key < 256; key++) {
326  if (keybindings[key]) {
327  if (!Q_stricmp(keybindings[key], binding)) {
328  return key;
329  }
330  }
331  }
332 
333  return -1;
334 }

Referenced by Keybind_Push(), and Keybind_Remove().

◆ Key_Event()

void Key_Event ( unsigned  key,
qboolean  down,
unsigned  time 
)

Definition at line 627 of file keys.c.

628 {
629  char *kb;
630  char cmd[MAX_STRING_CHARS];
631 
632  if (key >= 256) {
633  Com_Error(ERR_FATAL, "%s: bad key", __func__);
634  }
635 
636  Com_DDDPrintf("%u: %c%s\n", time,
637  down ? '+' : '-', Key_KeynumToString(key));
638 
639  // hack for menu key binding
640  if (key_wait_cb && down && !key_wait_cb(key_wait_arg, key)) {
641  return;
642  }
643 
644  // update key down and auto-repeat status
645  if (down) {
646  if (keydown[key] < 255)
647  keydown[key]++;
648  } else {
649  keydown[key] = 0;
650  }
651 
652  // console key is hardcoded, so the user can never unbind it
653  if (!Key_IsDown(K_SHIFT) && (key == '`' || key == '~')) {
654  if (keydown[key] == 1) {
656  }
657  return;
658  }
659 
660  // Alt+Enter is hardcoded for all systems
661  if (Key_IsDown(K_ALT) && key == K_ENTER) {
662  if (keydown[key] == 1) {
664  }
665  return;
666  }
667 
668  // menu key is hardcoded, so the user can never unbind it
669  if (key == K_ESCAPE) {
670  if (!down) {
671  return;
672  }
673 
674  if (cls.key_dest == KEY_GAME &&
675  cl.frame.ps.stats[STAT_LAYOUTS] &&
676  cls.demo.playback == qfalse) {
677  if (keydown[key] == 2) {
678  // force main menu if escape is held
679  UI_OpenMenu(UIMENU_GAME);
680  } else if (keydown[key] == 1) {
681  // put away help computer / inventory
682  CL_ClientCommand("putaway");
683  }
684  return;
685  }
686 
687  // ignore autorepeats
688  if (keydown[key] > 1) {
689  return;
690  }
691 
692  if (cls.key_dest & KEY_CONSOLE) {
693  if (cls.state < ca_active && !(cls.key_dest & KEY_MENU)) {
694  UI_OpenMenu(UIMENU_MAIN);
695  } else {
696  Con_Close(qtrue);
697  }
698  } else if (cls.key_dest & KEY_MENU) {
699  UI_KeyEvent(key, down);
700  } else if (cls.key_dest & KEY_MESSAGE) {
701  Key_Message(key);
702  } else if (cls.state >= ca_active) {
703  UI_OpenMenu(UIMENU_GAME);
704  } else {
705  UI_OpenMenu(UIMENU_MAIN);
706  }
707  return;
708  }
709 
710  // track if any key is down for BUTTON_ANY
711  if (down) {
712  if (keydown[key] == 1)
713  anykeydown++;
714  } else {
715  anykeydown--;
716  if (anykeydown < 0)
717  anykeydown = 0;
718  }
719 
720  // hack for demo freelook in windowed mode
721  if (cls.key_dest == KEY_GAME && cls.demo.playback && key == K_SHIFT && keydown[key] <= 1) {
722  IN_Activate();
723  }
724 
725  // skip the rest of the cinematic
726  if (cls.key_dest == KEY_GAME && cls.state == ca_cinematic && down) {
728  }
729 
730  if (cls.key_dest == KEY_GAME)
731  {
732  if(R_InterceptKey(key, down))
733  return;
734  }
735 
736 //
737 // if not a consolekey, send to the interpreter no matter what mode is
738 //
739  if ((cls.key_dest == KEY_GAME) ||
740  ((cls.key_dest & KEY_CONSOLE) && !Q_IsBitSet(consolekeys, key)) ||
741  ((cls.key_dest & KEY_MENU) && (key >= K_F1 && key <= K_F12)) ||
742  (!down && Q_IsBitSet(buttondown, key))) {
743 //
744 // Key up events only generate commands if the game key binding is a button
745 // command (leading + sign). These will occur even in console mode, to keep the
746 // character from continuing an action started before a console switch. Button
747 // commands include the kenum as a parameter, so multiple downs can be matched
748 // with ups.
749 //
750  if (!down) {
751  kb = keybindings[key];
752  if (kb && kb[0] == '+') {
753  Q_snprintf(cmd, sizeof(cmd), "-%s %i %i\n",
754  kb + 1, key, time);
755  Cbuf_AddText(&cmd_buffer, cmd);
756  }
757  Q_ClearBit(buttondown, key);
758  return;
759  }
760 
761  // ignore autorepeats
762  if (keydown[key] > 1) {
763  return;
764  }
765 
766  // generate button up command when released
767  Q_SetBit(buttondown, key);
768 
769  kb = keybindings[key];
770  if (kb) {
771  if (kb[0] == '+') {
772  // button commands add keynum and time as a parm
773  Q_snprintf(cmd, sizeof(cmd), "%s %i %i\n", kb, key, time);
774  Cbuf_AddText(&cmd_buffer, cmd);
775  } else {
776  Cbuf_AddText(&cmd_buffer, kb);
777  Cbuf_AddText(&cmd_buffer, "\n");
778  }
779  }
780  return;
781  }
782 
783  if (cls.key_dest == KEY_GAME)
784  return;
785 
786  if (!down) {
787  if (cls.key_dest & KEY_MENU)
788  UI_KeyEvent(key, down);
789  return; // other subsystems only care about key down events
790  }
791 
792  if (cls.key_dest & KEY_CONSOLE) {
793  Key_Console(key);
794  } else if (cls.key_dest & KEY_MENU) {
795  UI_KeyEvent(key, down);
796  } else if (cls.key_dest & KEY_MESSAGE) {
797  Key_Message(key);
798  }
799 
800  if (Key_IsDown(K_CTRL) || Key_IsDown(K_ALT)) {
801  return;
802  }
803 
804  switch (key) {
805  case K_KP_SLASH:
806  key = '/';
807  break;
808  case K_KP_MULTIPLY:
809  key = '*';
810  break;
811  case K_KP_MINUS:
812  key = '-';
813  break;
814  case K_KP_PLUS:
815  key = '+';
816  break;
817  case K_KP_HOME:
818  key = '7';
819  break;
820  case K_KP_UPARROW:
821  key = '8';
822  break;
823  case K_KP_PGUP:
824  key = '9';
825  break;
826  case K_KP_LEFTARROW:
827  key = '4';
828  break;
829  case K_KP_5:
830  key = '5';
831  break;
832  case K_KP_RIGHTARROW:
833  key = '6';
834  break;
835  case K_KP_END:
836  key = '1';
837  break;
838  case K_KP_DOWNARROW:
839  key = '2';
840  break;
841  case K_KP_PGDN:
842  key = '3';
843  break;
844  case K_KP_INS:
845  key = '0';
846  break;
847  case K_KP_DEL:
848  key = '.';
849  break;
850  }
851 
852  // if key is printable, generate char events
853  if (key < 32 || key >= 127) {
854  return;
855  }
856 
857  if (Key_IsDown(K_SHIFT)) {
858  key = keyshift[key];
859  }
860 
861  if (cls.key_dest & KEY_CONSOLE) {
862  Char_Console(key);
863  } else if (cls.key_dest & KEY_MENU) {
864  UI_CharEvent(key);
865  } else if (cls.key_dest & KEY_MESSAGE) {
866  Char_Message(key);
867  }
868 }

Referenced by DI_GetMouseEvents(), Key_ClearStates(), legacy_key_event(), legacy_mouse_event(), LowLevelKeyboardProc(), mouse_hwheel_event(), mouse_wheel_event(), and raw_mouse_event().

◆ Key_GetBinding()

char* Key_GetBinding ( const char *  binding)

Definition at line 288 of file keys.c.

289 {
290  int key;
291 
292  for (key = 0; key < 256; key++) {
293  if (keybindings[key]) {
294  if (!Q_stricmp(keybindings[key], binding)) {
295  return Key_KeynumToString(key);
296  }
297  }
298  }
299 
300  return "";
301 }

Referenced by SCR_DrawInventory().

◆ Key_GetBindingForKey()

char* Key_GetBindingForKey ( int  keynum)

Definition at line 310 of file keys.c.

311 {
312  return keybindings[keynum];
313 }

Referenced by R_InterceptKey_RTX().

◆ Key_GetDest()

keydest_t Key_GetDest ( void  )

Definition at line 168 of file keys.c.

169 {
170  return cls.key_dest;
171 }

Referenced by mouse_wheel_event(), UI_Draw(), UI_ForceMenuOff(), UI_IsTransparent(), and UI_PushMenu().

◆ Key_GetOverstrikeMode()

qboolean Key_GetOverstrikeMode ( void  )

Definition at line 148 of file keys.c.

149 {
150  return key_overstrike;
151 }

◆ Key_Init()

void Key_Init ( void  )

Definition at line 520 of file keys.c.

521 {
522  int i;
523 
524 //
525 // init ascii characters in console mode
526 //
527  for (i = K_ASCIIFIRST; i <= K_ASCIILAST; i++)
528  Q_SetBit(consolekeys, i);
529 
530 #define K(x) \
531  Q_SetBit(consolekeys, K_##x)
532 
533  K(BACKSPACE);
534  K(TAB);
535  K(ENTER);
536 
537  K(UPARROW);
538  K(DOWNARROW);
539  K(LEFTARROW);
540  K(RIGHTARROW);
541 
542  K(ALT);
543  K(LALT);
544  K(RALT);
545  K(CTRL);
546  K(LCTRL);
547  K(RCTRL);
548  K(SHIFT);
549  K(LSHIFT);
550  K(RSHIFT);
551 
552  K(INS);
553  K(DEL);
554  K(PGDN);
555  K(PGUP);
556  K(HOME);
557  K(END);
558 
559  K(KP_HOME);
560  K(KP_UPARROW);
561  K(KP_PGUP);
562  K(KP_LEFTARROW);
563  K(KP_5);
564  K(KP_RIGHTARROW);
565  K(KP_END);
566  K(KP_DOWNARROW);
567  K(KP_PGDN);
568  K(KP_ENTER);
569  K(KP_INS);
570  K(KP_DEL);
571  K(KP_SLASH);
572  K(KP_MINUS);
573  K(KP_PLUS);
574  K(KP_MULTIPLY);
575 
576  K(MOUSE3);
577 
578  K(MWHEELUP);
579  K(MWHEELDOWN);
580 
581 #undef K
582 
583 //
584 // init ascii keyshift characters
585 //
586  for (i = 0; i < 256; i++)
587  keyshift[i] = i;
588  for (i = 'a'; i <= 'z'; i++)
589  keyshift[i] = i - 'a' + 'A';
590 
591  keyshift['1'] = '!';
592  keyshift['2'] = '@';
593  keyshift['3'] = '#';
594  keyshift['4'] = '$';
595  keyshift['5'] = '%';
596  keyshift['6'] = '^';
597  keyshift['7'] = '&';
598  keyshift['8'] = '*';
599  keyshift['9'] = '(';
600  keyshift['0'] = ')';
601  keyshift['-'] = '_';
602  keyshift['='] = '+';
603  keyshift[','] = '<';
604  keyshift['.'] = '>';
605  keyshift['/'] = '?';
606  keyshift[';'] = ':';
607  keyshift['\''] = '"';
608  keyshift['['] = '{';
609  keyshift[']'] = '}';
610  keyshift['`'] = '~';
611  keyshift['\\'] = '|';
612 
613 //
614 // register our functions
615 //
617 }

Referenced by Qcommon_Init().

◆ Key_IsDown()

int Key_IsDown ( int  key)

Definition at line 204 of file keys.c.

205 {
206  if (key < 0 || key > 255) {
207  return 0;
208  }
209 
210  return keydown[key];
211 }

Referenced by IN_GetCurrentGrab(), Key_Console(), Key_Event(), Key_Message(), Keydown(), MenuList_Key(), R_InterceptKey_RTX(), SCR_DrawLayout(), vkpt_freecam_mousemove(), and vkpt_freecam_update().

◆ Key_KeynumToString()

char* Key_KeynumToString ( int  keynum)

Definition at line 259 of file keys.c.

260 {
261  const keyname_t *kn;
262  static char tinystr[2];
263 
264  if (keynum == -1)
265  return "<KEY NOT FOUND>";
266 
267  if (keynum > 32 && keynum < 127 && keynum != ';' && keynum != '"') {
268  // printable ascii
269  tinystr[0] = keynum;
270  tinystr[1] = 0;
271  return tinystr;
272  }
273 
274  for (kn = keynames; kn->name; kn++)
275  if (keynum == kn->keynum)
276  return kn->name;
277 
278  return "<UNKNOWN KEYNUM>";
279 }

Referenced by Key_Bindlist_f(), Key_Bound_g(), Key_Event(), Key_GetBinding(), Key_WriteBindings(), and Keybind_Push().

◆ Key_Name_g()

static void Key_Name_g ( genctx_t *  ctx)
static

Definition at line 355 of file keys.c.

356 {
357  const keyname_t *k;
358 
359  ctx->ignorecase = qtrue;
360  for (k = keynames; k->name; k++) {
361  if (!Prompt_AddMatch(ctx, k->name)) {
362  break;
363  }
364  }
365 }

Referenced by Key_Bind_c().

◆ Key_SetBinding()

void Key_SetBinding ( int  keynum,
const char *  binding 
)

Definition at line 341 of file keys.c.

342 {
343  if (keynum < 0 || keynum > 255)
344  return;
345 
346 // free old binding
347  if (keybindings[keynum]) {
348  Z_Free(keybindings[keynum]);
349  }
350 
351 // allocate memory for new binding
352  keybindings[keynum] = Z_CopyString(binding);
353 }

Referenced by Key_Bind_f(), Key_Unbind_f(), Key_Unbindall_f(), keybind_cb(), and Keybind_Remove().

◆ Key_SetDest()

void Key_SetDest ( keydest_t  dest)

Definition at line 178 of file keys.c.

179 {
180  int diff;
181 
182 // if not connected, console or menu should be up
183  if (cls.state < ca_active && !(dest & (KEY_MENU | KEY_CONSOLE))) {
184  dest |= KEY_CONSOLE;
185  }
186 
187  diff = cls.key_dest ^ dest;
188  cls.key_dest = dest;
189 
190 // activate or deactivate mouse
191  if (diff & (KEY_CONSOLE | KEY_MENU)) {
192  IN_Activate();
194  }
195 }

Referenced by Con_Close(), Con_Popup(), Key_Message(), start_message_mode(), toggle_console(), UI_ForceMenuOff(), and UI_PushMenu().

◆ Key_SetOverstrikeMode()

void Key_SetOverstrikeMode ( qboolean  overstrike)

Definition at line 158 of file keys.c.

159 {
160  key_overstrike = overstrike;
161 }

◆ Key_StringToKeynum()

int Key_StringToKeynum ( const char *  str)

Definition at line 234 of file keys.c.

235 {
236  const keyname_t *kn;
237 
238  if (!str || !str[0])
239  return -1;
240  if (!str[1])
241  return Q_tolower(str[0]);
242 
243  for (kn = keynames; kn->name; kn++) {
244  if (!Q_stricmp(str, kn->name))
245  return kn->keynum;
246  }
247  return -1;
248 }

Referenced by Key_Bind_f(), and Key_Unbind_f().

◆ Key_Unbind_c()

static void Key_Unbind_c ( genctx_t *  ctx,
int  argnum 
)
static

Definition at line 390 of file keys.c.

391 {
392  if (argnum == 1) {
393  Key_Bound_g(ctx);
394  }
395 }

◆ Key_Unbind_f()

static void Key_Unbind_f ( void  )
static

Definition at line 402 of file keys.c.

403 {
404  int b;
405 
406  if (Cmd_Argc() != 2) {
407  Com_Printf("unbind <key> : remove commands from a key\n");
408  return;
409  }
410 
412  if (b == -1) {
413  Com_Printf("\"%s\" isn't a valid key\n", Cmd_Argv(1));
414  return;
415  }
416 
417  Key_SetBinding(b, NULL);
418 }

◆ Key_Unbindall_f()

static void Key_Unbindall_f ( void  )
static

Definition at line 425 of file keys.c.

426 {
427  int i;
428 
429  for (i = 0; i < 256; i++)
430  if (keybindings[i])
431  Key_SetBinding(i, NULL);
432 }

◆ Key_WaitKey()

void Key_WaitKey ( keywaitcb_t  wait,
void arg 
)

Definition at line 899 of file keys.c.

900 {
901  key_wait_cb = wait;
902  key_wait_arg = arg;
903 }

Referenced by keybind_cb(), Keybind_DoEnter(), and Keybind_Pop().

◆ Key_WriteBindings()

void Key_WriteBindings ( qhandle_t  f)

Definition at line 475 of file keys.c.

476 {
477  int i;
478 
479  for (i = 0; i < 256; i++) {
480  if (keybindings[i] && keybindings[i][0]) {
481  FS_FPrintf(f, "bind %s \"%s\"\n", Key_KeynumToString(i),
482  keybindings[i]);
483  }
484  }
485 }

Referenced by CL_WriteConfig(), and CL_WriteConfig_f().

Variable Documentation

◆ anykeydown

int anykeydown
static

Definition at line 36 of file keys.c.

Referenced by Key_AnyKeyDown(), Key_ClearStates(), and Key_Event().

◆ buttondown

byte buttondown[256/8]
static

Definition at line 39 of file keys.c.

Referenced by Key_ClearStates(), and Key_Event().

◆ c_keys

cmdreg_t c_keys[]
static
Initial value:
= {
{ "bind", Key_Bind_f, Key_Bind_c },
{ "unbind", Key_Unbind_f, Key_Unbind_c },
{ "unbindall", Key_Unbindall_f },
{ "bindlist", Key_Bindlist_f },
{ NULL }
}

Definition at line 506 of file keys.c.

Referenced by Key_Init().

◆ consolekeys

byte consolekeys[256/8]
static

Definition at line 27 of file keys.c.

Referenced by Key_Event(), and Key_Init().

◆ key_overstrike

qboolean key_overstrike
static

Definition at line 41 of file keys.c.

Referenced by Key_GetOverstrikeMode(), and Key_SetOverstrikeMode().

◆ key_wait_arg

void* key_wait_arg
static

Definition at line 22 of file keys.c.

Referenced by Key_ClearStates(), Key_Event(), and Key_WaitKey().

◆ key_wait_cb

keywaitcb_t key_wait_cb
static

Definition at line 21 of file keys.c.

Referenced by Key_ClearStates(), Key_Event(), and Key_WaitKey().

◆ keybindings

◆ keydown

byte keydown[256]
static

Definition at line 33 of file keys.c.

Referenced by Key_ClearStates(), Key_Event(), and Key_IsDown().

◆ keynames

const keyname_t keynames[]
static

Definition at line 50 of file keys.c.

Referenced by Key_KeynumToString(), Key_Name_g(), and Key_StringToKeynum().

◆ keyshift

byte keyshift[256]
static

Definition at line 30 of file keys.c.

Referenced by Key_Event(), and Key_Init().

client_state_s::frame
server_frame_t frame
Definition: client.h:212
keydown
static byte keydown[256]
Definition: keys.c:33
R_InterceptKey
qboolean(* R_InterceptKey)(unsigned key, qboolean down)
Definition: refresh.c:428
Key_Bind_f
static void Key_Bind_f(void)
Definition: keys.c:440
client_static_s::playback
qhandle_t playback
Definition: client.h:453
Q_snprintf
size_t Q_snprintf(char *dest, size_t size, const char *fmt,...)
Definition: shared.c:846
c_keys
static cmdreg_t c_keys[]
Definition: keys.c:506
client_static_s::demo
struct client_static_s::@3 demo
key_wait_cb
static keywaitcb_t key_wait_cb
Definition: keys.c:21
Key_Console
void Key_Console(int key)
Definition: console.c:1137
keyname_s::keynum
int keynum
Definition: keys.c:45
keyname_s
Definition: keys.c:43
client_static_s::key_dest
keydest_t key_dest
Definition: client.h:376
IN_Activate
void IN_Activate(void)
Definition: input.c:117
Key_Bindlist_f
static void Key_Bindlist_f(void)
Definition: keys.c:494
keyname_s::name
char * name
Definition: keys.c:44
anykeydown
static int anykeydown
Definition: keys.c:36
ca_active
@ ca_active
Definition: client.h:340
FS_FPrintf
ssize_t FS_FPrintf(qhandle_t f, const char *format,...)
Definition: files.c:2039
keyshift
static byte keyshift[256]
Definition: keys.c:30
client_static_s::state
connstate_t state
Definition: client.h:375
Key_Bind_c
static void Key_Bind_c(genctx_t *ctx, int argnum)
Definition: keys.c:381
Key_Name_g
static void Key_Name_g(genctx_t *ctx)
Definition: keys.c:355
Cmd_Argv
char * Cmd_Argv(int arg)
Definition: cmd.c:899
Con_ToggleConsole_f
void Con_ToggleConsole_f(void)
Definition: console.c:194
Cmd_Argc
int Cmd_Argc(void)
Definition: cmd.c:889
Prompt_AddMatch
qboolean Prompt_AddMatch(genctx_t *ctx, const char *s)
Definition: prompt.c:149
cmd_buffer
cmdbuf_t cmd_buffer
Definition: cmd.c:49
Com_Generic_c
void Com_Generic_c(genctx_t *ctx, int argnum)
Definition: common.c:748
Cmd_ArgsFrom
char * Cmd_ArgsFrom(int from)
Definition: cmd.c:981
Com_Error
void Com_Error(error_type_t type, const char *fmt,...)
Definition: g_main.c:258
Key_Unbind_c
static void Key_Unbind_c(genctx_t *ctx, int argnum)
Definition: keys.c:390
buttondown
static byte buttondown[256/8]
Definition: keys.c:39
SCR_FinishCinematic
void SCR_FinishCinematic(void)
Definition: cin.c:105
Cbuf_AddText
void Cbuf_AddText(cmdbuf_t *buf, const char *text)
Definition: cmd.c:95
Z_Free
void Z_Free(void *ptr)
Definition: zone.c:147
Cmd_Register
void Cmd_Register(const cmdreg_t *reg)
Definition: cmd.c:1572
Key_IsDown
int Key_IsDown(int key)
Definition: keys.c:204
Key_SetBinding
void Key_SetBinding(int keynum, const char *binding)
Definition: keys.c:341
consolekeys
static byte consolekeys[256/8]
Definition: keys.c:27
CL_CheckForPause
void CL_CheckForPause(void)
Definition: main.c:3056
Con_Close
void Con_Close(qboolean force)
Definition: console.c:124
Key_KeynumToString
char * Key_KeynumToString(int keynum)
Definition: keys.c:259
UI_CharEvent
void UI_CharEvent(int key)
Definition: ui.c:528
Key_Message
void Key_Message(int key)
Definition: console.c:1241
UI_OpenMenu
void UI_OpenMenu(uiMenu_t type)
Definition: ui.c:208
Char_Console
void Char_Console(int key)
Definition: console.c:1229
Key_Unbindall_f
static void Key_Unbindall_f(void)
Definition: keys.c:425
cl
client_state_t cl
Definition: main.c:99
key_overstrike
static qboolean key_overstrike
Definition: keys.c:41
K
#define K(x)
Definition: keys.c:48
cls
client_static_t cls
Definition: main.c:98
ca_cinematic
@ ca_cinematic
Definition: client.h:341
VID_ToggleFullscreen
void VID_ToggleFullscreen(void)
Definition: refresh.c:204
c
statCounters_t c
Definition: main.c:30
Key_StringToKeynum
int Key_StringToKeynum(const char *str)
Definition: keys.c:234
Key_Event
void Key_Event(unsigned key, qboolean down, unsigned time)
Definition: keys.c:627
server_frame_t::ps
player_state_t ps
Definition: client.h:137
diff
static q_noinline int diff(uint32_t A_u32, uint32_t B_u32)
Definition: hq2x.c:55
Key_Bound_g
static void Key_Bound_g(genctx_t *ctx)
Definition: keys.c:367
CL_ClientCommand
void CL_ClientCommand(const char *string)
Definition: main.c:299
key_wait_arg
static void * key_wait_arg
Definition: keys.c:22
UI_KeyEvent
void UI_KeyEvent(int key, qboolean down)
Definition: ui.c:503
keynames
static const keyname_t keynames[]
Definition: keys.c:50
Char_Message
void Char_Message(int key)
Definition: console.c:1289
keybindings
static char * keybindings[256]
Definition: keys.c:24
Key_Unbind_f
static void Key_Unbind_f(void)
Definition: keys.c:402
com_eventTime
unsigned com_eventTime
Definition: common.c:122