vkQuake2 doxygen  1.0 dev
keys.h File Reference

Go to the source code of this file.

Macros

#define K_TAB   9
 
#define K_ENTER   13
 
#define K_ESCAPE   27
 
#define K_SPACE   32
 
#define K_BACKSPACE   127
 
#define K_UPARROW   128
 
#define K_DOWNARROW   129
 
#define K_LEFTARROW   130
 
#define K_RIGHTARROW   131
 
#define K_ALT   132
 
#define K_CTRL   133
 
#define K_SHIFT   134
 
#define K_F1   135
 
#define K_F2   136
 
#define K_F3   137
 
#define K_F4   138
 
#define K_F5   139
 
#define K_F6   140
 
#define K_F7   141
 
#define K_F8   142
 
#define K_F9   143
 
#define K_F10   144
 
#define K_F11   145
 
#define K_F12   146
 
#define K_INS   147
 
#define K_DEL   148
 
#define K_PGDN   149
 
#define K_PGUP   150
 
#define K_HOME   151
 
#define K_END   152
 
#define K_CMD   153
 
#define K_KP_HOME   160
 
#define K_KP_UPARROW   161
 
#define K_KP_PGUP   162
 
#define K_KP_LEFTARROW   163
 
#define K_KP_5   164
 
#define K_KP_RIGHTARROW   165
 
#define K_KP_END   166
 
#define K_KP_DOWNARROW   167
 
#define K_KP_PGDN   168
 
#define K_KP_ENTER   169
 
#define K_KP_INS   170
 
#define K_KP_DEL   171
 
#define K_KP_SLASH   172
 
#define K_KP_MINUS   173
 
#define K_KP_PLUS   174
 
#define K_PAUSE   255
 
#define K_MOUSE1   200
 
#define K_MOUSE2   201
 
#define K_MOUSE3   202
 
#define K_JOY1   203
 
#define K_JOY2   204
 
#define K_JOY3   205
 
#define K_JOY4   206
 
#define K_AUX1   207
 
#define K_AUX2   208
 
#define K_AUX3   209
 
#define K_AUX4   210
 
#define K_AUX5   211
 
#define K_AUX6   212
 
#define K_AUX7   213
 
#define K_AUX8   214
 
#define K_AUX9   215
 
#define K_AUX10   216
 
#define K_AUX11   217
 
#define K_AUX12   218
 
#define K_AUX13   219
 
#define K_AUX14   220
 
#define K_AUX15   221
 
#define K_AUX16   222
 
#define K_AUX17   223
 
#define K_AUX18   224
 
#define K_AUX19   225
 
#define K_AUX20   226
 
#define K_AUX21   227
 
#define K_AUX22   228
 
#define K_AUX23   229
 
#define K_AUX24   230
 
#define K_AUX25   231
 
#define K_AUX26   232
 
#define K_AUX27   233
 
#define K_AUX28   234
 
#define K_AUX29   235
 
#define K_AUX30   236
 
#define K_AUX31   237
 
#define K_AUX32   238
 
#define K_MWHEELDOWN   239
 
#define K_MWHEELUP   240
 

Functions

void Key_Event (int key, qboolean down, unsigned time)
 
void Key_Init (void)
 
void Key_WriteBindings (FILE *f)
 
void Key_SetBinding (int keynum, char *binding)
 
void Key_ClearStates (void)
 
int Key_GetKey (void)
 

Variables

char * keybindings [256]
 
int key_repeats [256]
 
int anykeydown
 
char chat_buffer []
 
int chat_bufferlen
 
qboolean chat_team
 

Macro Definition Documentation

◆ K_ALT

#define K_ALT   132

Definition at line 38 of file keys.h.

◆ K_AUX1

#define K_AUX1   207

Definition at line 98 of file keys.h.

◆ K_AUX10

#define K_AUX10   216

Definition at line 107 of file keys.h.

◆ K_AUX11

#define K_AUX11   217

Definition at line 108 of file keys.h.

◆ K_AUX12

#define K_AUX12   218

Definition at line 109 of file keys.h.

◆ K_AUX13

#define K_AUX13   219

Definition at line 110 of file keys.h.

◆ K_AUX14

#define K_AUX14   220

Definition at line 111 of file keys.h.

◆ K_AUX15

#define K_AUX15   221

Definition at line 112 of file keys.h.

◆ K_AUX16

#define K_AUX16   222

Definition at line 113 of file keys.h.

◆ K_AUX17

#define K_AUX17   223

Definition at line 114 of file keys.h.

◆ K_AUX18

#define K_AUX18   224

Definition at line 115 of file keys.h.

◆ K_AUX19

#define K_AUX19   225

Definition at line 116 of file keys.h.

◆ K_AUX2

#define K_AUX2   208

Definition at line 99 of file keys.h.

◆ K_AUX20

#define K_AUX20   226

Definition at line 117 of file keys.h.

◆ K_AUX21

#define K_AUX21   227

Definition at line 118 of file keys.h.

◆ K_AUX22

#define K_AUX22   228

Definition at line 119 of file keys.h.

◆ K_AUX23

#define K_AUX23   229

Definition at line 120 of file keys.h.

◆ K_AUX24

#define K_AUX24   230

Definition at line 121 of file keys.h.

◆ K_AUX25

#define K_AUX25   231

Definition at line 122 of file keys.h.

◆ K_AUX26

#define K_AUX26   232

Definition at line 123 of file keys.h.

◆ K_AUX27

#define K_AUX27   233

Definition at line 124 of file keys.h.

◆ K_AUX28

#define K_AUX28   234

Definition at line 125 of file keys.h.

◆ K_AUX29

#define K_AUX29   235

Definition at line 126 of file keys.h.

◆ K_AUX3

#define K_AUX3   209

Definition at line 100 of file keys.h.

◆ K_AUX30

#define K_AUX30   236

Definition at line 127 of file keys.h.

◆ K_AUX31

#define K_AUX31   237

Definition at line 128 of file keys.h.

◆ K_AUX32

#define K_AUX32   238

Definition at line 129 of file keys.h.

◆ K_AUX4

#define K_AUX4   210

Definition at line 101 of file keys.h.

◆ K_AUX5

#define K_AUX5   211

Definition at line 102 of file keys.h.

◆ K_AUX6

#define K_AUX6   212

Definition at line 103 of file keys.h.

◆ K_AUX7

#define K_AUX7   213

Definition at line 104 of file keys.h.

◆ K_AUX8

#define K_AUX8   214

Definition at line 105 of file keys.h.

◆ K_AUX9

#define K_AUX9   215

Definition at line 106 of file keys.h.

◆ K_BACKSPACE

#define K_BACKSPACE   127

Definition at line 32 of file keys.h.

◆ K_CMD

#define K_CMD   153

Definition at line 59 of file keys.h.

◆ K_CTRL

#define K_CTRL   133

Definition at line 39 of file keys.h.

◆ K_DEL

#define K_DEL   148

Definition at line 54 of file keys.h.

◆ K_DOWNARROW

#define K_DOWNARROW   129

Definition at line 34 of file keys.h.

◆ K_END

#define K_END   152

Definition at line 58 of file keys.h.

◆ K_ENTER

#define K_ENTER   13

Definition at line 26 of file keys.h.

◆ K_ESCAPE

#define K_ESCAPE   27

Definition at line 27 of file keys.h.

◆ K_F1

#define K_F1   135

Definition at line 41 of file keys.h.

◆ K_F10

#define K_F10   144

Definition at line 50 of file keys.h.

◆ K_F11

#define K_F11   145

Definition at line 51 of file keys.h.

◆ K_F12

#define K_F12   146

Definition at line 52 of file keys.h.

◆ K_F2

#define K_F2   136

Definition at line 42 of file keys.h.

◆ K_F3

#define K_F3   137

Definition at line 43 of file keys.h.

◆ K_F4

#define K_F4   138

Definition at line 44 of file keys.h.

◆ K_F5

#define K_F5   139

Definition at line 45 of file keys.h.

◆ K_F6

#define K_F6   140

Definition at line 46 of file keys.h.

◆ K_F7

#define K_F7   141

Definition at line 47 of file keys.h.

◆ K_F8

#define K_F8   142

Definition at line 48 of file keys.h.

◆ K_F9

#define K_F9   143

Definition at line 49 of file keys.h.

◆ K_HOME

#define K_HOME   151

Definition at line 57 of file keys.h.

◆ K_INS

#define K_INS   147

Definition at line 53 of file keys.h.

◆ K_JOY1

#define K_JOY1   203

Definition at line 89 of file keys.h.

◆ K_JOY2

#define K_JOY2   204

Definition at line 90 of file keys.h.

◆ K_JOY3

#define K_JOY3   205

Definition at line 91 of file keys.h.

◆ K_JOY4

#define K_JOY4   206

Definition at line 92 of file keys.h.

◆ K_KP_5

#define K_KP_5   164

Definition at line 65 of file keys.h.

◆ K_KP_DEL

#define K_KP_DEL   171

Definition at line 72 of file keys.h.

◆ K_KP_DOWNARROW

#define K_KP_DOWNARROW   167

Definition at line 68 of file keys.h.

◆ K_KP_END

#define K_KP_END   166

Definition at line 67 of file keys.h.

◆ K_KP_ENTER

#define K_KP_ENTER   169

Definition at line 70 of file keys.h.

◆ K_KP_HOME

#define K_KP_HOME   160

Definition at line 61 of file keys.h.

◆ K_KP_INS

#define K_KP_INS   170

Definition at line 71 of file keys.h.

◆ K_KP_LEFTARROW

#define K_KP_LEFTARROW   163

Definition at line 64 of file keys.h.

◆ K_KP_MINUS

#define K_KP_MINUS   173

Definition at line 74 of file keys.h.

◆ K_KP_PGDN

#define K_KP_PGDN   168

Definition at line 69 of file keys.h.

◆ K_KP_PGUP

#define K_KP_PGUP   162

Definition at line 63 of file keys.h.

◆ K_KP_PLUS

#define K_KP_PLUS   174

Definition at line 75 of file keys.h.

◆ K_KP_RIGHTARROW

#define K_KP_RIGHTARROW   165

Definition at line 66 of file keys.h.

◆ K_KP_SLASH

#define K_KP_SLASH   172

Definition at line 73 of file keys.h.

◆ K_KP_UPARROW

#define K_KP_UPARROW   161

Definition at line 62 of file keys.h.

◆ K_LEFTARROW

#define K_LEFTARROW   130

Definition at line 35 of file keys.h.

◆ K_MOUSE1

#define K_MOUSE1   200

Definition at line 82 of file keys.h.

◆ K_MOUSE2

#define K_MOUSE2   201

Definition at line 83 of file keys.h.

◆ K_MOUSE3

#define K_MOUSE3   202

Definition at line 84 of file keys.h.

◆ K_MWHEELDOWN

#define K_MWHEELDOWN   239

Definition at line 131 of file keys.h.

◆ K_MWHEELUP

#define K_MWHEELUP   240

Definition at line 132 of file keys.h.

◆ K_PAUSE

#define K_PAUSE   255

Definition at line 77 of file keys.h.

◆ K_PGDN

#define K_PGDN   149

Definition at line 55 of file keys.h.

◆ K_PGUP

#define K_PGUP   150

Definition at line 56 of file keys.h.

◆ K_RIGHTARROW

#define K_RIGHTARROW   131

Definition at line 36 of file keys.h.

◆ K_SHIFT

#define K_SHIFT   134

Definition at line 40 of file keys.h.

◆ K_SPACE

#define K_SPACE   32

Definition at line 28 of file keys.h.

◆ K_TAB

#define K_TAB   9

Definition at line 25 of file keys.h.

◆ K_UPARROW

#define K_UPARROW   128

Definition at line 33 of file keys.h.

Function Documentation

◆ Key_ClearStates()

void Key_ClearStates ( void  )

Definition at line 935 of file keys.c.

936 {
937  int i;
938 
939  anykeydown = false;
940 
941  for (i=0 ; i<256 ; i++)
942  {
943  if ( keydown[i] || key_repeats[i] )
944  Key_Event( i, false, 0 );
945  keydown[i] = 0;
946  key_repeats[i] = 0;
947  }
948 }

Referenced by AppActivate(), and M_ForceMenuOff().

◆ Key_Event()

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

Definition at line 744 of file keys.c.

745 {
746  char *kb;
747  char cmd[1024];
748 
749  // hack for modal presses
750  if (key_waiting == -1)
751  {
752  if (down)
753  key_waiting = key;
754  return;
755  }
756 
757  keydown[key] = down;
758  // ALT+ENTER fullscreen toggle
759  if (down && keydown[K_ALT] && key == K_ENTER)
760  {
761  extern cvar_t *vid_fullscreen;
762  Cvar_Set("vid_fullscreen", vid_fullscreen->value ? "0" : "1");
763  vid_fullscreen->modified = true;
764  return;
765  }
766 
767 #ifdef __APPLE__
768  // ALT+F4 game shutdown
769  if (down && keydown[K_ALT] && key == K_F4)
770  {
771  CL_Quit_f();
772  return;
773  }
774 #endif
775 
776  // update auto-repeat status
777  if (down)
778  {
779  key_repeats[key]++;
780  if (key != K_BACKSPACE
781  && key != K_PAUSE
782  && key != K_PGUP
783  && key != K_KP_PGUP
784  && key != K_PGDN
785  && key != K_KP_PGDN
786  && key_repeats[key] > 1)
787  return; // ignore most autorepeats
788 
789  if (key >= 200 && key != K_MWHEELUP && key != K_MWHEELDOWN && !keybindings[key])
790  Com_Printf ("%s is unbound, hit F4 to set.\n", Key_KeynumToString (key) );
791  }
792  else
793  {
794  key_repeats[key] = 0;
795  }
796 
797  if (key == K_SHIFT)
798  shift_down = down;
799 
800  // console key is hardcoded, so the user can never unbind it
801  if (key == '`' || key == '~')
802  {
803  if (!down)
804  return;
806  return;
807  }
808 
809  // any key during the attract mode will bring up the menu
810  if (cl.attractloop && cls.key_dest != key_menu &&
811  !(key >= K_F1 && key <= K_F12))
812  key = K_ESCAPE;
813 
814  // menu key is hardcoded, so the user can never unbind it
815  if (key == K_ESCAPE)
816  {
817  if (!down)
818  return;
819 
821  { // put away help computer / inventory
822  Cbuf_AddText ("cmd putaway\n");
823  return;
824  }
825  switch (cls.key_dest)
826  {
827  case key_message:
828  Key_Message (key);
829  break;
830  case key_menu:
831  M_Keydown (key);
832  break;
833  case key_game:
834  case key_console:
835  M_Menu_Main_f ();
836  break;
837  default:
838  Com_Error (ERR_FATAL, "Bad cls.key_dest");
839  }
840  return;
841  }
842 
843  if (down)
844  {
845  if (key_repeats[key] == 1)
846  anykeydown++;
847  }
848  else
849  {
850  anykeydown--;
851  if (anykeydown < 0)
852  anykeydown = 0;
853  }
854 
855 //
856 // key up events only generate commands if the game key binding is
857 // a button command (leading + sign). These will occur even in console mode,
858 // to keep the character from continuing an action started before a console
859 // switch. Button commands include the kenum as a parameter, so multiple
860 // downs can be matched with ups
861 //
862  if (!down)
863  {
864  kb = keybindings[key];
865  if (kb && kb[0] == '+')
866  {
867  Com_sprintf (cmd, sizeof(cmd), "-%s %i %i\n", kb+1, key, time);
868  Cbuf_AddText (cmd);
869  }
870  if (keyshift[key] != key)
871  {
872  kb = keybindings[keyshift[key]];
873  if (kb && kb[0] == '+')
874  {
875  Com_sprintf (cmd, sizeof(cmd), "-%s %i %i\n", kb+1, key, time);
876  Cbuf_AddText (cmd);
877  }
878  }
879  return;
880  }
881 
882 //
883 // if not a consolekey, send to the interpreter no matter what mode is
884 //
885  if ( (cls.key_dest == key_menu && menubound[key])
886  || (cls.key_dest == key_console && !consolekeys[key])
887  || (cls.key_dest == key_game && ( cls.state == ca_active || !consolekeys[key] ) ) )
888  {
889  kb = keybindings[key];
890  if (kb)
891  {
892  if (kb[0] == '+')
893  { // button commands add keynum and time as a parm
894  Com_sprintf (cmd, sizeof(cmd), "%s %i %i\n", kb, key, time);
895  Cbuf_AddText (cmd);
896  }
897  else
898  {
899  Cbuf_AddText (kb);
900  Cbuf_AddText ("\n");
901  }
902  }
903  return;
904  }
905 
906  if (!down)
907  return; // other systems only care about key down events
908 
909  if (shift_down)
910  key = keyshift[key];
911 
912  switch (cls.key_dest)
913  {
914  case key_message:
915  Key_Message (key);
916  break;
917  case key_menu:
918  M_Keydown (key);
919  break;
920 
921  case key_game:
922  case key_console:
923  Key_Console (key);
924  break;
925  default:
926  Com_Error (ERR_FATAL, "Bad cls.key_dest");
927  }
928 }

Referenced by IN_Commands(), IN_MouseEvent(), Key_ClearStates(), and MainWndProc().

◆ Key_GetKey()

int Key_GetKey ( void  )

Definition at line 956 of file keys.c.

957 {
958  key_waiting = -1;
959 
960  while (key_waiting == -1)
962 
963  return key_waiting;
964 }

◆ Key_Init()

void Key_Init ( void  )

Definition at line 647 of file keys.c.

648 {
649  int i;
650 
651  for (i=0 ; i<128 ; i++)
652  {
653  key_lines[i][0] = ']';
654  key_lines[i][1] = 0;
655  }
656  key_linepos = 1;
657 
658 //
659 // init ascii characters in console mode
660 //
661  for (i=32 ; i<128 ; i++)
662  consolekeys[i] = true;
663  consolekeys[K_ENTER] = true;
664  consolekeys[K_KP_ENTER] = true;
665  consolekeys[K_TAB] = true;
666  consolekeys[K_LEFTARROW] = true;
667  consolekeys[K_KP_LEFTARROW] = true;
668  consolekeys[K_RIGHTARROW] = true;
670  consolekeys[K_UPARROW] = true;
671  consolekeys[K_KP_UPARROW] = true;
672  consolekeys[K_DOWNARROW] = true;
673  consolekeys[K_KP_DOWNARROW] = true;
674  consolekeys[K_BACKSPACE] = true;
675  consolekeys[K_HOME] = true;
676  consolekeys[K_KP_HOME] = true;
677  consolekeys[K_END] = true;
678  consolekeys[K_KP_END] = true;
679  consolekeys[K_PGUP] = true;
680  consolekeys[K_KP_PGUP] = true;
681  consolekeys[K_PGDN] = true;
682  consolekeys[K_KP_PGDN] = true;
683  consolekeys[K_MWHEELUP] = true;
684  consolekeys[K_MWHEELDOWN] = true;
685  consolekeys[K_SHIFT] = true;
686  consolekeys[K_INS] = true;
687  consolekeys[K_KP_INS] = true;
688  consolekeys[K_KP_DEL] = true;
689  consolekeys[K_KP_SLASH] = true;
690  consolekeys[K_KP_PLUS] = true;
691  consolekeys[K_KP_MINUS] = true;
692  consolekeys[K_KP_5] = true;
693 
694  consolekeys['`'] = false;
695  consolekeys['~'] = false;
696 
697  for (i=0 ; i<256 ; i++)
698  keyshift[i] = i;
699  for (i='a' ; i<='z' ; i++)
700  keyshift[i] = i - 'a' + 'A';
701  keyshift['1'] = '!';
702  keyshift['2'] = '@';
703  keyshift['3'] = '#';
704  keyshift['4'] = '$';
705  keyshift['5'] = '%';
706  keyshift['6'] = '^';
707  keyshift['7'] = '&';
708  keyshift['8'] = '*';
709  keyshift['9'] = '(';
710  keyshift['0'] = ')';
711  keyshift['-'] = '_';
712  keyshift['='] = '+';
713  keyshift[','] = '<';
714  keyshift['.'] = '>';
715  keyshift['/'] = '?';
716  keyshift[';'] = ':';
717  keyshift['\''] = '"';
718  keyshift['['] = '{';
719  keyshift[']'] = '}';
720  keyshift['`'] = '~';
721  keyshift['\\'] = '|';
722 
723  menubound[K_ESCAPE] = true;
724  for (i=0 ; i<12 ; i++)
725  menubound[K_F1+i] = true;
726 
727 //
728 // register our functions
729 //
730  Cmd_AddCommand ("bind",Key_Bind_f);
731  Cmd_AddCommand ("unbind",Key_Unbind_f);
732  Cmd_AddCommand ("unbindall",Key_Unbindall_f);
733  Cmd_AddCommand ("bindlist",Key_Bindlist_f);
734 }

◆ Key_SetBinding()

void Key_SetBinding ( int  keynum,
char *  binding 
)

Definition at line 506 of file keys.c.

507 {
508  char *new;
509  int l;
510 
511  if (keynum == -1)
512  return;
513 
514 // free old bindings
515  if (keybindings[keynum])
516  {
517  Z_Free (keybindings[keynum]);
518  keybindings[keynum] = NULL;
519  }
520 
521 // allocate memory for new binding
522  l = (int)strlen (binding);
523  new = Z_Malloc (l+1);
524  strcpy (new, binding);
525  new[l] = 0;
526  keybindings[keynum] = new;
527 }

Referenced by Key_Bind_f(), Key_Unbind_f(), Key_Unbindall_f(), and M_UnbindCommand().

◆ Key_WriteBindings()

void Key_WriteBindings ( FILE *  f)

Definition at line 616 of file keys.c.

617 {
618  int i;
619 
620  for (i=0 ; i<256 ; i++)
621  if (keybindings[i] && keybindings[i][0])
622  fprintf (f, "bind %s \"%s\"\n", Key_KeynumToString(i), keybindings[i]);
623 }

Referenced by CL_WriteConfiguration().

Variable Documentation

◆ anykeydown

int anykeydown

Definition at line 34 of file keys.c.

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

◆ chat_buffer

char chat_buffer[]

Definition at line 392 of file keys.c.

Referenced by Con_DrawNotify(), and Key_Message().

◆ chat_bufferlen

int chat_bufferlen

Definition at line 393 of file keys.c.

Referenced by Con_DrawNotify(), and Key_Message().

◆ chat_team

qboolean chat_team

Definition at line 391 of file keys.c.

Referenced by Con_DrawNotify(), Con_MessageMode2_f(), Con_MessageMode_f(), and Key_Message().

◆ key_repeats

int key_repeats[256]

Definition at line 44 of file keys.c.

Referenced by Key_ClearStates(), and Key_Event().

◆ keybindings

K_KP_ENTER
#define K_KP_ENTER
Definition: keys.h:70
vid_fullscreen
cvar_t * vid_fullscreen
Definition: vid_dll.c:47
K_INS
#define K_INS
Definition: keys.h:53
K_KP_RIGHTARROW
#define K_KP_RIGHTARROW
Definition: keys.h:66
int
CONST PIXELFORMATDESCRIPTOR int
Definition: qgl_win.c:35
client_state_t::attractloop
qboolean attractloop
Definition: client.h:153
menubound
qboolean menubound[256]
Definition: keys.c:42
K_PGUP
#define K_PGUP
Definition: keys.h:56
keydown
qboolean keydown[256]
Definition: keys.c:45
K_F12
#define K_F12
Definition: keys.h:52
Key_Event
void Key_Event(int key, qboolean down, unsigned time)
Definition: keys.c:744
K_ALT
#define K_ALT
Definition: keys.h:38
M_Menu_Main_f
void M_Menu_Main_f(void)
Definition: menu.c:494
cvar_s::modified
qboolean modified
Definition: q_shared.h:330
K_BACKSPACE
#define K_BACKSPACE
Definition: keys.h:32
K_KP_END
#define K_KP_END
Definition: keys.h:67
K_ENTER
#define K_ENTER
Definition: keys.h:26
K_KP_MINUS
#define K_KP_MINUS
Definition: keys.h:74
i
int i
Definition: q_shared.c:305
anykeydown
int anykeydown
Definition: keys.c:34
ca_active
@ ca_active
Definition: client.h:189
Con_ToggleConsole_f
void Con_ToggleConsole_f(void)
Definition: console.c:68
K_KP_PLUS
#define K_KP_PLUS
Definition: keys.h:75
consolekeys
qboolean consolekeys[256]
Definition: keys.c:41
key_waiting
int key_waiting
Definition: keys.c:39
cvar_s
Definition: q_shared.h:324
K_HOME
#define K_HOME
Definition: keys.h:57
key_menu
@ key_menu
Definition: client.h:200
K_MWHEELDOWN
#define K_MWHEELDOWN
Definition: keys.h:131
K_KP_5
#define K_KP_5
Definition: keys.h:65
keyshift
int keyshift[256]
Definition: keys.c:43
K_KP_SLASH
#define K_KP_SLASH
Definition: keys.h:73
K_KP_INS
#define K_KP_INS
Definition: keys.h:71
K_END
#define K_END
Definition: keys.h:58
shift_down
int shift_down
Definition: keys.c:33
Sys_SendKeyEvents
void Sys_SendKeyEvents(void)
Definition: sys_win.c:406
Cmd_AddCommand
void Cmd_AddCommand(char *cmd_name, xcommand_t function)
Definition: cmd.c:691
Key_Bindlist_f
void Key_Bindlist_f(void)
Definition: keys.c:632
key_game
@ key_game
Definition: client.h:200
K_LEFTARROW
#define K_LEFTARROW
Definition: keys.h:35
Cbuf_AddText
void Cbuf_AddText(char *text)
Definition: cmd.c:90
cvar_s::value
float value
Definition: q_shared.h:331
Key_Unbind_f
void Key_Unbind_f(void)
Definition: keys.c:534
K_DOWNARROW
#define K_DOWNARROW
Definition: keys.h:34
K_KP_DEL
#define K_KP_DEL
Definition: keys.h:72
K_KP_UPARROW
#define K_KP_UPARROW
Definition: keys.h:62
K_KP_HOME
#define K_KP_HOME
Definition: keys.h:61
key_console
@ key_console
Definition: client.h:200
NULL
#define NULL
Definition: q_shared.h:67
client_state_t::frame
frame_t frame
Definition: client.h:116
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:181
Key_KeynumToString
char * Key_KeynumToString(int keynum)
Definition: keys.c:479
Z_Malloc
void * Z_Malloc(int size)
Definition: common.c:1200
Key_Message
void Key_Message(int key)
Definition: keys.c:395
K_PAUSE
#define K_PAUSE
Definition: keys.h:77
K_RIGHTARROW
#define K_RIGHTARROW
Definition: keys.h:36
ERR_FATAL
#define ERR_FATAL
Definition: qcommon.h:743
key_linepos
int key_linepos
Definition: keys.c:32
frame_t::playerstate
player_state_t playerstate
Definition: client.h:50
Key_Unbindall_f
void Key_Unbindall_f(void)
Definition: keys.c:554
Z_Free
void Z_Free(void *ptr)
Definition: common.c:1122
client_static_t::state
connstate_t state
Definition: client.h:204
key_repeats
int key_repeats[256]
Definition: keys.c:44
M_Keydown
void M_Keydown(int key)
Definition: menu.c:4031
Key_Bind_f
void Key_Bind_f(void)
Definition: keys.c:569
key_lines
char key_lines[128][MAXCMDLINE]
Definition: keys.c:31
Cvar_Set
cvar_t * Cvar_Set(char *var_name, char *value)
Definition: cvar.c:278
client_static_t::key_dest
keydest_t key_dest
Definition: client.h:205
K_KP_PGUP
#define K_KP_PGUP
Definition: keys.h:63
K_KP_DOWNARROW
#define K_KP_DOWNARROW
Definition: keys.h:68
K_ESCAPE
#define K_ESCAPE
Definition: keys.h:27
K_PGDN
#define K_PGDN
Definition: keys.h:55
K_TAB
#define K_TAB
Definition: keys.h:25
K_MWHEELUP
#define K_MWHEELUP
Definition: keys.h:132
Com_Printf
void Com_Printf(char *fmt,...)
Definition: common.c:104
STAT_LAYOUTS
#define STAT_LAYOUTS
Definition: q_shared.h:1014
CL_Quit_f
void CL_Quit_f(void)
Definition: cl_main.c:386
K_SHIFT
#define K_SHIFT
Definition: keys.h:40
Key_Console
void Key_Console(int key)
Definition: keys.c:196
cls
client_static_t cls
Definition: cl_main.c:90
K_KP_PGDN
#define K_KP_PGDN
Definition: keys.h:69
K_F4
#define K_F4
Definition: keys.h:44
K_UPARROW
#define K_UPARROW
Definition: keys.h:33
keybindings
char * keybindings[256]
Definition: keys.c:40
key_message
@ key_message
Definition: client.h:200
cl
client_state_t cl
Definition: cl_main.c:91
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1223
K_KP_LEFTARROW
#define K_KP_LEFTARROW
Definition: keys.h:64
K_F1
#define K_F1
Definition: keys.h:41
player_state_t::stats
short stats[MAX_STATS]
Definition: q_shared.h:1196