keycodes.h (2565B)
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 Foobar; 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_LAST_KEY // this had better be <256! 155 } keyNum_t; 156 157 158 // The menu code needs to get both key and char events, but 159 // to avoid duplicating the paths, the char events are just 160 // distinguished by or'ing in K_CHAR_FLAG (ugly) 161 #define K_CHAR_FLAG 1024 162 163 #endif