icculus quake2 doxygen
1.0 dev
keys.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 1997-2001 Id Software, Inc.
3
4
This program is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License
6
as published by the Free Software Foundation; either version 2
7
of the License, or (at your option) any later version.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13
See the GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19
*/
20
21
//
22
// these are the key numbers that should be passed to Key_Event
23
//
24
enum
QKEYS
{
25
K_TAB
= 9,
26
K_ENTER
= 13,
27
K_ESCAPE
= 27,
28
K_SPACE
= 32,
29
30
// normal keys should be passed as lowercased ascii
31
32
K_BACKSPACE
= 127,
33
K_UPARROW
= 128,
34
K_DOWNARROW
= 129,
35
K_LEFTARROW
= 130,
36
K_RIGHTARROW
= 131,
37
38
K_ALT
= 132,
39
K_CTRL
= 133,
40
K_SHIFT
= 134,
41
K_F1
= 135,
42
K_F2
= 136,
43
K_F3
= 137,
44
K_F4
= 138,
45
K_F5
= 139,
46
K_F6
= 140,
47
K_F7
= 141,
48
K_F8
= 142,
49
K_F9
= 143,
50
K_F10
= 144,
51
K_F11
= 145,
52
K_F12
= 146,
53
K_INS
= 147,
54
K_DEL
= 148,
55
K_PGDN
= 149,
56
K_PGUP
= 150,
57
K_HOME
= 151,
58
K_END
= 152,
59
60
K_KP_HOME
= 160,
61
K_KP_UPARROW
= 161,
62
K_KP_PGUP
= 162,
63
K_KP_LEFTARROW
= 163,
64
K_KP_5
= 164,
65
K_KP_RIGHTARROW
= 165,
66
K_KP_END
= 166,
67
K_KP_DOWNARROW
= 167,
68
K_KP_PGDN
= 168,
69
K_KP_ENTER
= 169,
70
K_KP_INS
= 170,
71
K_KP_DEL
= 171,
72
K_KP_SLASH
= 172,
73
K_KP_MINUS
= 173,
74
K_KP_PLUS
= 174,
75
76
//
77
// mouse buttons generate virtual keys
78
//
79
K_MOUSE1
= 200,
80
K_MOUSE2
= 201,
81
K_MOUSE3
= 202,
82
K_MOUSE4
= 241,
83
K_MOUSE5
= 242,
84
85
//
86
// joystick buttons
87
//
88
K_JOY1
= 203,
89
K_JOY2
= 204,
90
K_JOY3
= 205,
91
K_JOY4
= 206,
92
93
//
94
// aux keys are for multi-buttoned joysticks to generate so they can use
95
// the normal binding process
96
//
97
K_AUX1
= 207,
98
K_AUX2
= 208,
99
K_AUX3
= 209,
100
K_AUX4
= 210,
101
K_AUX5
= 211,
102
K_AUX6
= 212,
103
K_AUX7
= 213,
104
K_AUX8
= 214,
105
K_AUX9
= 215,
106
K_AUX10
= 216,
107
K_AUX11
= 217,
108
K_AUX12
= 218,
109
K_AUX13
= 219,
110
K_AUX14
= 220,
111
K_AUX15
= 221,
112
K_AUX16
= 222,
113
K_AUX17
= 223,
114
K_AUX18
= 224,
115
K_AUX19
= 225,
116
K_AUX20
= 226,
117
K_AUX21
= 227,
118
K_AUX22
= 228,
119
K_AUX23
= 229,
120
K_AUX24
= 230,
121
K_AUX25
= 231,
122
K_AUX26
= 232,
123
K_AUX27
= 233,
124
K_AUX28
= 234,
125
K_AUX29
= 235,
126
K_AUX30
= 236,
127
K_AUX31
= 237,
128
K_AUX32
= 238,
129
130
K_MWHEELDOWN
= 239,
131
K_MWHEELUP
= 240,
132
133
K_PAUSE
= 255,
134
135
K_LAST
136
};
137
138
extern
char
*
keybindings
[
K_LAST
];
139
extern
int
key_repeats
[
K_LAST
];
140
141
extern
int
anykeydown
;
142
extern
char
chat_buffer
[];
143
extern
int
chat_bufferlen
;
144
extern
qboolean
chat_team
;
145
146
void
Key_Event
(
int
key,
qboolean
down,
unsigned
time);
147
void
Key_Init
(
void
);
148
void
Key_WriteBindings
(FILE *f);
149
void
Key_SetBinding
(
int
keynum,
char
*binding);
150
void
Key_ClearStates
(
void
);
151
int
Key_GetKey
(
void
);
152
K_KP_PLUS
@ K_KP_PLUS
Definition:
keys.h:74
K_AUX3
@ K_AUX3
Definition:
keys.h:99
K_END
@ K_END
Definition:
keys.h:58
K_DOWNARROW
@ K_DOWNARROW
Definition:
keys.h:34
K_AUX31
@ K_AUX31
Definition:
keys.h:127
K_KP_UPARROW
@ K_KP_UPARROW
Definition:
keys.h:61
anykeydown
int anykeydown
Definition:
keys.c:33
K_MOUSE4
@ K_MOUSE4
Definition:
keys.h:82
K_KP_PGDN
@ K_KP_PGDN
Definition:
keys.h:68
K_MOUSE5
@ K_MOUSE5
Definition:
keys.h:83
Key_WriteBindings
void Key_WriteBindings(FILE *f)
Definition:
keys.c:619
K_AUX26
@ K_AUX26
Definition:
keys.h:122
K_AUX28
@ K_AUX28
Definition:
keys.h:124
K_AUX13
@ K_AUX13
Definition:
keys.h:109
qboolean
qboolean
Definition:
q_shared.h:56
key_repeats
int key_repeats[K_LAST]
Definition:
keys.c:43
Key_GetKey
int Key_GetKey(void)
Definition:
keys.c:940
K_AUX18
@ K_AUX18
Definition:
keys.h:114
K_AUX4
@ K_AUX4
Definition:
keys.h:100
K_KP_LEFTARROW
@ K_KP_LEFTARROW
Definition:
keys.h:63
K_AUX23
@ K_AUX23
Definition:
keys.h:119
K_F12
@ K_F12
Definition:
keys.h:52
K_AUX2
@ K_AUX2
Definition:
keys.h:98
Key_SetBinding
void Key_SetBinding(int keynum, char *binding)
Definition:
keys.c:509
K_F7
@ K_F7
Definition:
keys.h:47
K_AUX8
@ K_AUX8
Definition:
keys.h:104
K_AUX12
@ K_AUX12
Definition:
keys.h:108
K_AUX11
@ K_AUX11
Definition:
keys.h:107
K_MWHEELDOWN
@ K_MWHEELDOWN
Definition:
keys.h:130
K_HOME
@ K_HOME
Definition:
keys.h:57
K_AUX17
@ K_AUX17
Definition:
keys.h:113
K_KP_HOME
@ K_KP_HOME
Definition:
keys.h:60
K_ENTER
@ K_ENTER
Definition:
keys.h:26
K_JOY3
@ K_JOY3
Definition:
keys.h:90
K_AUX29
@ K_AUX29
Definition:
keys.h:125
K_KP_INS
@ K_KP_INS
Definition:
keys.h:70
K_F8
@ K_F8
Definition:
keys.h:48
chat_buffer
char chat_buffer[]
Definition:
keys.c:395
Key_Event
void Key_Event(int key, qboolean down, unsigned time)
Definition:
keys.c:745
K_LEFTARROW
@ K_LEFTARROW
Definition:
keys.h:35
K_KP_MINUS
@ K_KP_MINUS
Definition:
keys.h:73
K_AUX6
@ K_AUX6
Definition:
keys.h:102
K_F6
@ K_F6
Definition:
keys.h:46
K_AUX27
@ K_AUX27
Definition:
keys.h:123
K_AUX20
@ K_AUX20
Definition:
keys.h:116
K_ESCAPE
@ K_ESCAPE
Definition:
keys.h:27
K_AUX21
@ K_AUX21
Definition:
keys.h:117
K_F2
@ K_F2
Definition:
keys.h:42
Key_Init
void Key_Init(void)
Definition:
keys.c:650
K_PGUP
@ K_PGUP
Definition:
keys.h:56
keybindings
char * keybindings[K_LAST]
Definition:
keys.c:39
K_JOY1
@ K_JOY1
Definition:
keys.h:88
K_AUX30
@ K_AUX30
Definition:
keys.h:126
K_F10
@ K_F10
Definition:
keys.h:50
K_KP_RIGHTARROW
@ K_KP_RIGHTARROW
Definition:
keys.h:65
K_PGDN
@ K_PGDN
Definition:
keys.h:55
K_AUX5
@ K_AUX5
Definition:
keys.h:101
K_INS
@ K_INS
Definition:
keys.h:53
K_JOY4
@ K_JOY4
Definition:
keys.h:91
K_F9
@ K_F9
Definition:
keys.h:49
QKEYS
QKEYS
Definition:
keys.h:24
chat_team
qboolean chat_team
Definition:
keys.c:394
K_CTRL
@ K_CTRL
Definition:
keys.h:39
K_KP_END
@ K_KP_END
Definition:
keys.h:66
K_MOUSE3
@ K_MOUSE3
Definition:
keys.h:81
K_AUX1
@ K_AUX1
Definition:
keys.h:97
K_F3
@ K_F3
Definition:
keys.h:43
K_KP_ENTER
@ K_KP_ENTER
Definition:
keys.h:69
K_AUX19
@ K_AUX19
Definition:
keys.h:115
K_KP_DEL
@ K_KP_DEL
Definition:
keys.h:71
K_MOUSE2
@ K_MOUSE2
Definition:
keys.h:80
Key_ClearStates
void Key_ClearStates(void)
Definition:
keys.c:919
K_JOY2
@ K_JOY2
Definition:
keys.h:89
chat_bufferlen
int chat_bufferlen
Definition:
keys.c:396
K_F4
@ K_F4
Definition:
keys.h:44
K_AUX22
@ K_AUX22
Definition:
keys.h:118
K_KP_SLASH
@ K_KP_SLASH
Definition:
keys.h:72
K_TAB
@ K_TAB
Definition:
keys.h:25
K_UPARROW
@ K_UPARROW
Definition:
keys.h:33
K_AUX7
@ K_AUX7
Definition:
keys.h:103
K_AUX10
@ K_AUX10
Definition:
keys.h:106
K_SHIFT
@ K_SHIFT
Definition:
keys.h:40
K_SPACE
@ K_SPACE
Definition:
keys.h:28
K_AUX32
@ K_AUX32
Definition:
keys.h:128
K_KP_5
@ K_KP_5
Definition:
keys.h:64
K_KP_PGUP
@ K_KP_PGUP
Definition:
keys.h:62
K_LAST
@ K_LAST
Definition:
keys.h:135
K_PAUSE
@ K_PAUSE
Definition:
keys.h:133
K_ALT
@ K_ALT
Definition:
keys.h:38
K_AUX25
@ K_AUX25
Definition:
keys.h:121
K_AUX9
@ K_AUX9
Definition:
keys.h:105
K_F11
@ K_F11
Definition:
keys.h:51
K_RIGHTARROW
@ K_RIGHTARROW
Definition:
keys.h:36
K_AUX14
@ K_AUX14
Definition:
keys.h:110
K_DEL
@ K_DEL
Definition:
keys.h:54
K_AUX24
@ K_AUX24
Definition:
keys.h:120
K_MOUSE1
@ K_MOUSE1
Definition:
keys.h:79
K_AUX15
@ K_AUX15
Definition:
keys.h:111
K_F5
@ K_F5
Definition:
keys.h:45
K_MWHEELUP
@ K_MWHEELUP
Definition:
keys.h:131
K_BACKSPACE
@ K_BACKSPACE
Definition:
keys.h:32
K_KP_DOWNARROW
@ K_KP_DOWNARROW
Definition:
keys.h:67
K_F1
@ K_F1
Definition:
keys.h:41
K_AUX16
@ K_AUX16
Definition:
keys.h:112
src
client
keys.h
Generated by
1.8.17