comparison include/SDL_keysym.h @ 1673:624e1412fbba SDL-1.3

Keyboard code update in progress
author Sam Lantinga <slouken@libsdl.org>
date Sat, 10 Jun 2006 09:11:59 +0000
parents 782fd950bd46
children
comparison
equal deleted inserted replaced
1672:8e754b82cecc 1673:624e1412fbba
25 */ 25 */
26 26
27 #ifndef _SDL_keysym_h 27 #ifndef _SDL_keysym_h
28 #define _SDL_keysym_h 28 #define _SDL_keysym_h
29 29
30 /* What we really want is a mapping of every raw key on the keyboard. 30 /**
31 To support international keyboards, we use the range 0xA1 - 0xFF 31 * \enum SDLKey
32 as international virtual keycodes. We'll follow in the footsteps of X11... 32 *
33 The names of the keys 33 * \brief The SDL virtual key representation
34 *
35 * The SDLKey represents the unmodified character printed on the key
36 * for the current keyboard layout. The first 255 characters are used
37 * unchanged from Latin-1, e.g. a key with 'a' on it will have the value "a".
38 * The rest of the keys are named below, and fall into the range above 255.
34 */ 39 */
35
36 typedef enum 40 typedef enum
37 { 41 {
38 /* The keyboard syms have been cleverly chosen to map to ASCII */ 42 /* The keyboard syms have been cleverly chosen to map to ASCII */
39 SDLK_UNKNOWN = 0, 43 SDLK_UNKNOWN = 0,
40 SDLK_FIRST = 0, 44 SDLK_FIRST = 0,
112 SDLK_y = 121, 116 SDLK_y = 121,
113 SDLK_z = 122, 117 SDLK_z = 122,
114 SDLK_DELETE = 127, 118 SDLK_DELETE = 127,
115 /* End of ASCII mapped keysyms */ 119 /* End of ASCII mapped keysyms */
116 120
117 /* International keyboard syms */
118 SDLK_WORLD_0 = 160, /* 0xA0 */
119 SDLK_WORLD_1 = 161,
120 SDLK_WORLD_2 = 162,
121 SDLK_WORLD_3 = 163,
122 SDLK_WORLD_4 = 164,
123 SDLK_WORLD_5 = 165,
124 SDLK_WORLD_6 = 166,
125 SDLK_WORLD_7 = 167,
126 SDLK_WORLD_8 = 168,
127 SDLK_WORLD_9 = 169,
128 SDLK_WORLD_10 = 170,
129 SDLK_WORLD_11 = 171,
130 SDLK_WORLD_12 = 172,
131 SDLK_WORLD_13 = 173,
132 SDLK_WORLD_14 = 174,
133 SDLK_WORLD_15 = 175,
134 SDLK_WORLD_16 = 176,
135 SDLK_WORLD_17 = 177,
136 SDLK_WORLD_18 = 178,
137 SDLK_WORLD_19 = 179,
138 SDLK_WORLD_20 = 180,
139 SDLK_WORLD_21 = 181,
140 SDLK_WORLD_22 = 182,
141 SDLK_WORLD_23 = 183,
142 SDLK_WORLD_24 = 184,
143 SDLK_WORLD_25 = 185,
144 SDLK_WORLD_26 = 186,
145 SDLK_WORLD_27 = 187,
146 SDLK_WORLD_28 = 188,
147 SDLK_WORLD_29 = 189,
148 SDLK_WORLD_30 = 190,
149 SDLK_WORLD_31 = 191,
150 SDLK_WORLD_32 = 192,
151 SDLK_WORLD_33 = 193,
152 SDLK_WORLD_34 = 194,
153 SDLK_WORLD_35 = 195,
154 SDLK_WORLD_36 = 196,
155 SDLK_WORLD_37 = 197,
156 SDLK_WORLD_38 = 198,
157 SDLK_WORLD_39 = 199,
158 SDLK_WORLD_40 = 200,
159 SDLK_WORLD_41 = 201,
160 SDLK_WORLD_42 = 202,
161 SDLK_WORLD_43 = 203,
162 SDLK_WORLD_44 = 204,
163 SDLK_WORLD_45 = 205,
164 SDLK_WORLD_46 = 206,
165 SDLK_WORLD_47 = 207,
166 SDLK_WORLD_48 = 208,
167 SDLK_WORLD_49 = 209,
168 SDLK_WORLD_50 = 210,
169 SDLK_WORLD_51 = 211,
170 SDLK_WORLD_52 = 212,
171 SDLK_WORLD_53 = 213,
172 SDLK_WORLD_54 = 214,
173 SDLK_WORLD_55 = 215,
174 SDLK_WORLD_56 = 216,
175 SDLK_WORLD_57 = 217,
176 SDLK_WORLD_58 = 218,
177 SDLK_WORLD_59 = 219,
178 SDLK_WORLD_60 = 220,
179 SDLK_WORLD_61 = 221,
180 SDLK_WORLD_62 = 222,
181 SDLK_WORLD_63 = 223,
182 SDLK_WORLD_64 = 224,
183 SDLK_WORLD_65 = 225,
184 SDLK_WORLD_66 = 226,
185 SDLK_WORLD_67 = 227,
186 SDLK_WORLD_68 = 228,
187 SDLK_WORLD_69 = 229,
188 SDLK_WORLD_70 = 230,
189 SDLK_WORLD_71 = 231,
190 SDLK_WORLD_72 = 232,
191 SDLK_WORLD_73 = 233,
192 SDLK_WORLD_74 = 234,
193 SDLK_WORLD_75 = 235,
194 SDLK_WORLD_76 = 236,
195 SDLK_WORLD_77 = 237,
196 SDLK_WORLD_78 = 238,
197 SDLK_WORLD_79 = 239,
198 SDLK_WORLD_80 = 240,
199 SDLK_WORLD_81 = 241,
200 SDLK_WORLD_82 = 242,
201 SDLK_WORLD_83 = 243,
202 SDLK_WORLD_84 = 244,
203 SDLK_WORLD_85 = 245,
204 SDLK_WORLD_86 = 246,
205 SDLK_WORLD_87 = 247,
206 SDLK_WORLD_88 = 248,
207 SDLK_WORLD_89 = 249,
208 SDLK_WORLD_90 = 250,
209 SDLK_WORLD_91 = 251,
210 SDLK_WORLD_92 = 252,
211 SDLK_WORLD_93 = 253,
212 SDLK_WORLD_94 = 254,
213 SDLK_WORLD_95 = 255, /* 0xFF */
214
215 /* Numeric keypad */ 121 /* Numeric keypad */
216 SDLK_KP0 = 256, 122 SDLK_KP0 = 256,
217 SDLK_KP1 = 257, 123 SDLK_KP1 = 257,
218 SDLK_KP2 = 258, 124 SDLK_KP2 = 258,
219 SDLK_KP3 = 259, 125 SDLK_KP3 = 259,
269 SDLK_LCTRL = 306, 175 SDLK_LCTRL = 306,
270 SDLK_RALT = 307, 176 SDLK_RALT = 307,
271 SDLK_LALT = 308, 177 SDLK_LALT = 308,
272 SDLK_RMETA = 309, 178 SDLK_RMETA = 309,
273 SDLK_LMETA = 310, 179 SDLK_LMETA = 310,
274 SDLK_LSUPER = 311, /* Left "Windows" key */ 180 SDLK_LSUPER = 311, /**< Left "Windows" key */
275 SDLK_RSUPER = 312, /* Right "Windows" key */ 181 SDLK_RSUPER = 312, /**< Right "Windows" key */
276 SDLK_MODE = 313, /* "Alt Gr" key */ 182 SDLK_MODE = 313, /**< "Alt Gr" key */
277 SDLK_COMPOSE = 314, /* Multi-key compose key */ 183 SDLK_COMPOSE = 314, /**< Multi-key compose key */
278 184
279 /* Miscellaneous function keys */ 185 /* Miscellaneous function keys */
280 SDLK_HELP = 315, 186 SDLK_HELP = 315,
281 SDLK_PRINT = 316, 187 SDLK_PRINT = 316,
282 SDLK_SYSREQ = 317, 188 SDLK_SYSREQ = 317,
283 SDLK_BREAK = 318, 189 SDLK_BREAK = 318,
284 SDLK_MENU = 319, 190 SDLK_MENU = 319,
285 SDLK_POWER = 320, /* Power Macintosh power key */ 191 SDLK_POWER = 320, /**< Power Macintosh power key */
286 SDLK_EURO = 321, /* Some european keyboards */ 192 SDLK_EURO = 321, /**< Some european keyboards */
287 SDLK_UNDO = 322, /* Atari keyboard has Undo */ 193 SDLK_UNDO = 322, /**< Atari keyboard has Undo */
288 194
289 /* Add any other keys here */ 195 /* Add any other keys here */
290 196
291 SDLK_LAST 197 SDLK_LAST
292 } SDLKey; 198 } SDLKey;
293 199
294 /* Enumeration of valid key mods (possibly OR'd together) */ 200 /**
201 * \enum SDLMod
202 *
203 * \brief Enumeration of valid key mods (possibly OR'd together)
204 */
295 typedef enum 205 typedef enum
296 { 206 {
297 KMOD_NONE = 0x0000, 207 KMOD_NONE = 0x0000,
298 KMOD_LSHIFT = 0x0001, 208 KMOD_LSHIFT = 0x0001,
299 KMOD_RSHIFT = 0x0002, 209 KMOD_RSHIFT = 0x0002,