1 /* 2 =========================================================================== 3 Copyright (C) 1999-2005 Id Software, Inc. 4 5 This file is part of Quake III Arena source code. 6 7 Quake III Arena source code is free software; you can redistribute it 8 and/or modify it under the terms of the GNU General Public License as 9 published by the Free Software Foundation; either version 2 of the License, 10 or (at your option) any later version. 11 12 Quake III Arena source code is distributed in the hope that it will be 13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with Quake III Arena source code; if not, write to the Free Software 19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 =========================================================================== 21 */ 22 // 23 #ifndef __KEYCODES_H__ 24 #define __KEYCODES_H__ 25 26 // 27 // these are the key numbers that should be passed to KeyEvent 28 // 29 30 // normal keys should be passed as lowercased ascii 31 32 typedef enum { 33 K_TAB = 9, 34 K_ENTER = 13, 35 K_ESCAPE = 27, 36 K_SPACE = 32, 37 38 K_BACKSPACE = 127, 39 40 K_COMMAND = 128, 41 K_CAPSLOCK, 42 K_POWER, 43 K_PAUSE, 44 45 K_UPARROW, 46 K_DOWNARROW, 47 K_LEFTARROW, 48 K_RIGHTARROW, 49 50 K_ALT, 51 K_CTRL, 52 K_SHIFT, 53 K_INS, 54 K_DEL, 55 K_PGDN, 56 K_PGUP, 57 K_HOME, 58 K_END, 59 60 K_F1, 61 K_F2, 62 K_F3, 63 K_F4, 64 K_F5, 65 K_F6, 66 K_F7, 67 K_F8, 68 K_F9, 69 K_F10, 70 K_F11, 71 K_F12, 72 K_F13, 73 K_F14, 74 K_F15, 75 76 K_KP_HOME, 77 K_KP_UPARROW, 78 K_KP_PGUP, 79 K_KP_LEFTARROW, 80 K_KP_5, 81 K_KP_RIGHTARROW, 82 K_KP_END, 83 K_KP_DOWNARROW, 84 K_KP_PGDN, 85 K_KP_ENTER, 86 K_KP_INS, 87 K_KP_DEL, 88 K_KP_SLASH, 89 K_KP_MINUS, 90 K_KP_PLUS, 91 K_KP_NUMLOCK, 92 K_KP_STAR, 93 K_KP_EQUALS, 94 95 K_MOUSE1, 96 K_MOUSE2, 97 K_MOUSE3, 98 K_MOUSE4, 99 K_MOUSE5, 100 101 K_MWHEELDOWN, 102 K_MWHEELUP, 103 104 K_JOY1, 105 K_JOY2, 106 K_JOY3, 107 K_JOY4, 108 K_JOY5, 109 K_JOY6, 110 K_JOY7, 111 K_JOY8, 112 K_JOY9, 113 K_JOY10, 114 K_JOY11, 115 K_JOY12, 116 K_JOY13, 117 K_JOY14, 118 K_JOY15, 119 K_JOY16, 120 K_JOY17, 121 K_JOY18, 122 K_JOY19, 123 K_JOY20, 124 K_JOY21, 125 K_JOY22, 126 K_JOY23, 127 K_JOY24, 128 K_JOY25, 129 K_JOY26, 130 K_JOY27, 131 K_JOY28, 132 K_JOY29, 133 K_JOY30, 134 K_JOY31, 135 K_JOY32, 136 137 K_AUX1, 138 K_AUX2, 139 K_AUX3, 140 K_AUX4, 141 K_AUX5, 142 K_AUX6, 143 K_AUX7, 144 K_AUX8, 145 K_AUX9, 146 K_AUX10, 147 K_AUX11, 148 K_AUX12, 149 K_AUX13, 150 K_AUX14, 151 K_AUX15, 152 K_AUX16, 153 154 K_WORLD_0, 155 K_WORLD_1, 156 K_WORLD_2, 157 K_WORLD_3, 158 K_WORLD_4, 159 K_WORLD_5, 160 K_WORLD_6, 161 K_WORLD_7, 162 K_WORLD_8, 163 K_WORLD_9, 164 K_WORLD_10, 165 K_WORLD_11, 166 K_WORLD_12, 167 K_WORLD_13, 168 K_WORLD_14, 169 K_WORLD_15, 170 K_WORLD_16, 171 K_WORLD_17, 172 K_WORLD_18, 173 K_WORLD_19, 174 K_WORLD_20, 175 K_WORLD_21, 176 K_WORLD_22, 177 K_WORLD_23, 178 K_WORLD_24, 179 K_WORLD_25, 180 K_WORLD_26, 181 K_WORLD_27, 182 K_WORLD_28, 183 K_WORLD_29, 184 K_WORLD_30, 185 K_WORLD_31, 186 K_WORLD_32, 187 K_WORLD_33, 188 K_WORLD_34, 189 K_WORLD_35, 190 K_WORLD_36, 191 K_WORLD_37, 192 K_WORLD_38, 193 K_WORLD_39, 194 K_WORLD_40, 195 K_WORLD_41, 196 K_WORLD_42, 197 K_WORLD_43, 198 K_WORLD_44, 199 K_WORLD_45, 200 K_WORLD_46, 201 K_WORLD_47, 202 K_WORLD_48, 203 K_WORLD_49, 204 K_WORLD_50, 205 K_WORLD_51, 206 K_WORLD_52, 207 K_WORLD_53, 208 K_WORLD_54, 209 K_WORLD_55, 210 K_WORLD_56, 211 K_WORLD_57, 212 K_WORLD_58, 213 K_WORLD_59, 214 K_WORLD_60, 215 K_WORLD_61, 216 K_WORLD_62, 217 K_WORLD_63, 218 K_WORLD_64, 219 K_WORLD_65, 220 K_WORLD_66, 221 K_WORLD_67, 222 K_WORLD_68, 223 K_WORLD_69, 224 K_WORLD_70, 225 K_WORLD_71, 226 K_WORLD_72, 227 K_WORLD_73, 228 K_WORLD_74, 229 K_WORLD_75, 230 K_WORLD_76, 231 K_WORLD_77, 232 K_WORLD_78, 233 K_WORLD_79, 234 K_WORLD_80, 235 K_WORLD_81, 236 K_WORLD_82, 237 K_WORLD_83, 238 K_WORLD_84, 239 K_WORLD_85, 240 K_WORLD_86, 241 K_WORLD_87, 242 K_WORLD_88, 243 K_WORLD_89, 244 K_WORLD_90, 245 K_WORLD_91, 246 K_WORLD_92, 247 K_WORLD_93, 248 K_WORLD_94, 249 K_WORLD_95, 250 251 K_SUPER, 252 K_COMPOSE, 253 K_MODE, 254 K_HELP, 255 K_PRINT, 256 K_SYSREQ, 257 K_SCROLLOCK, 258 K_BREAK, 259 K_MENU, 260 K_EURO, 261 K_UNDO, 262 263 // Pseudo-key that brings the console down 264 K_CONSOLE, 265 266 MAX_KEYS 267 } keyNum_t; 268 269 // MAX_KEYS replaces K_LAST_KEY, however some mods may have used K_LAST_KEY 270 // in detecting binds, so we leave it defined to the old hardcoded value 271 // of maxiumum keys to prevent mods from crashing older versions of the engine 272 #define K_LAST_KEY 256 273 274 // The menu code needs to get both key and char events, but 275 // to avoid duplicating the paths, the char events are just 276 // distinguished by or'ing in K_CHAR_FLAG (ugly) 277 #define K_CHAR_FLAG 1024 278 279 #endif 280