codemp/ui/keycodes.h

Go to the documentation of this file.
00001 // Copyright (C) 1999-2000 Id Software, Inc.
00002 //
00003 #ifndef __KEYCODES_H__
00004 #define __KEYCODES_H__
00005 
00006 // these are the key numbers that should be passed to KeyEvent
00007 
00008 typedef enum
00009 {
00010         A_NULL = 0,
00011         A_SHIFT,
00012         A_CTRL,
00013         A_ALT,
00014         A_CAPSLOCK,
00015         A_NUMLOCK,
00016         A_SCROLLLOCK,
00017         A_PAUSE,
00018         A_BACKSPACE,
00019         A_TAB,
00020         A_ENTER,
00021         A_KP_PLUS,
00022         A_KP_MINUS,
00023         A_KP_ENTER,
00024         A_KP_PERIOD,
00025         A_PRINTSCREEN,
00026         A_KP_0,
00027         A_KP_1,
00028         A_KP_2,
00029         A_KP_3,
00030         A_KP_4,
00031         A_KP_5,
00032         A_KP_6,
00033         A_KP_7,
00034         A_KP_8,
00035         A_KP_9,
00036         A_CONSOLE,
00037         A_ESCAPE,
00038         A_F1,
00039         A_F2,
00040         A_F3,
00041         A_F4,
00042 
00043         A_SPACE,
00044         A_PLING,
00045         A_DOUBLE_QUOTE,
00046         A_HASH,
00047         A_STRING,
00048         A_PERCENT,
00049         A_AND,
00050         A_SINGLE_QUOTE,
00051         A_OPEN_BRACKET,
00052         A_CLOSE_BRACKET,
00053         A_STAR,
00054         A_PLUS,
00055         A_COMMA,
00056         A_MINUS,
00057         A_PERIOD,
00058         A_FORWARD_SLASH,
00059         A_0,
00060         A_1,
00061         A_2,
00062         A_3,
00063         A_4,
00064         A_5,
00065         A_6,
00066         A_7,
00067         A_8,
00068         A_9,
00069         A_COLON,
00070         A_SEMICOLON,
00071         A_LESSTHAN,
00072         A_EQUALS,
00073         A_GREATERTHAN,
00074         A_QUESTION,
00075 
00076         A_AT,
00077         A_CAP_A,
00078         A_CAP_B,
00079         A_CAP_C,
00080         A_CAP_D,
00081         A_CAP_E,
00082         A_CAP_F,
00083         A_CAP_G,
00084         A_CAP_H,
00085         A_CAP_I,
00086         A_CAP_J,
00087         A_CAP_K,
00088         A_CAP_L,
00089         A_CAP_M,
00090         A_CAP_N,
00091         A_CAP_O,
00092         A_CAP_P,
00093         A_CAP_Q,
00094         A_CAP_R,
00095         A_CAP_S,
00096         A_CAP_T,
00097         A_CAP_U,
00098         A_CAP_V,
00099         A_CAP_W,
00100         A_CAP_X,
00101         A_CAP_Y,
00102         A_CAP_Z,
00103         A_OPEN_SQUARE,
00104         A_BACKSLASH,
00105         A_CLOSE_SQUARE,
00106         A_CARET,
00107         A_UNDERSCORE,
00108 
00109         A_LEFT_SINGLE_QUOTE,
00110         A_LOW_A,
00111         A_LOW_B,
00112         A_LOW_C,
00113         A_LOW_D,
00114         A_LOW_E,
00115         A_LOW_F,
00116         A_LOW_G,
00117         A_LOW_H,
00118         A_LOW_I,
00119         A_LOW_J,
00120         A_LOW_K,
00121         A_LOW_L,
00122         A_LOW_M,
00123         A_LOW_N,
00124         A_LOW_O,
00125         A_LOW_P,
00126         A_LOW_Q,
00127         A_LOW_R,
00128         A_LOW_S,
00129         A_LOW_T,
00130         A_LOW_U,
00131         A_LOW_V,
00132         A_LOW_W,
00133         A_LOW_X,
00134         A_LOW_Y,
00135         A_LOW_Z,
00136         A_OPEN_BRACE,
00137         A_BAR,
00138         A_CLOSE_BRACE,
00139         A_TILDE,
00140         A_DELETE,
00141 
00142         A_EURO,
00143         A_SHIFT2,
00144         A_CTRL2,
00145         A_ALT2,
00146         A_F5,
00147         A_F6,
00148         A_F7,
00149         A_F8,
00150         A_CIRCUMFLEX,
00151         A_MWHEELUP,
00152         A_CAP_SCARON,
00153         A_MWHEELDOWN,
00154         A_CAP_OE,
00155         A_MOUSE1,
00156         A_MOUSE2,
00157         A_INSERT,
00158         A_HOME,
00159         A_PAGE_UP,
00160         A_RIGHT_SINGLE_QUOTE,
00161         A_LEFT_DOUBLE_QUOTE,
00162         A_RIGHT_DOUBLE_QUOTE,
00163         A_F9,
00164         A_F10,
00165         A_F11,
00166         A_F12,
00167         A_TRADEMARK,
00168         A_LOW_SCARON,
00169         A_SHIFT_ENTER,
00170         A_LOW_OE,
00171         A_END,
00172         A_PAGE_DOWN,
00173         A_CAP_YDIERESIS,
00174 
00175         A_SHIFT_SPACE,
00176         A_EXCLAMDOWN,
00177         A_CENT,
00178         A_POUND,
00179         A_SHIFT_KP_ENTER,
00180         A_YEN,
00181         A_MOUSE3,
00182         A_MOUSE4,
00183         A_MOUSE5,
00184         A_COPYRIGHT,
00185         A_CURSOR_UP,
00186         A_CURSOR_DOWN,
00187         A_CURSOR_LEFT,
00188         A_CURSOR_RIGHT,
00189         A_REGISTERED,
00190         A_UNDEFINED_7,
00191         A_UNDEFINED_8,
00192         A_UNDEFINED_9,
00193         A_UNDEFINED_10,
00194         A_UNDEFINED_11,
00195         A_UNDEFINED_12,
00196         A_UNDEFINED_13,
00197         A_UNDEFINED_14,
00198         A_UNDEFINED_15,
00199         A_UNDEFINED_16,
00200         A_UNDEFINED_17,
00201         A_UNDEFINED_18,
00202         A_UNDEFINED_19,
00203         A_UNDEFINED_20,
00204         A_UNDEFINED_21,
00205         A_UNDEFINED_22,
00206         A_QUESTION_DOWN,
00207 
00208         A_CAP_AGRAVE,
00209         A_CAP_AACUTE,
00210         A_CAP_ACIRCUMFLEX,
00211         A_CAP_ATILDE,
00212         A_CAP_ADIERESIS,
00213         A_CAP_ARING,
00214         A_CAP_AE,
00215         A_CAP_CCEDILLA,
00216         A_CAP_EGRAVE,
00217         A_CAP_EACUTE,
00218         A_CAP_ECIRCUMFLEX,
00219         A_CAP_EDIERESIS,
00220         A_CAP_IGRAVE,
00221         A_CAP_IACUTE,
00222         A_CAP_ICIRCUMFLEX,
00223         A_CAP_IDIERESIS,
00224         A_CAP_ETH,
00225         A_CAP_NTILDE,
00226         A_CAP_OGRAVE,
00227         A_CAP_OACUTE,
00228         A_CAP_OCIRCUMFLEX,
00229         A_CAP_OTILDE,
00230         A_CAP_ODIERESIS,
00231         A_MULTIPLY,
00232         A_CAP_OSLASH,
00233         A_CAP_UGRAVE,
00234         A_CAP_UACUTE,
00235         A_CAP_UCIRCUMFLEX,
00236         A_CAP_UDIERESIS,
00237         A_CAP_YACUTE,
00238         A_CAP_THORN,
00239         A_GERMANDBLS,
00240 
00241         A_LOW_AGRAVE,
00242         A_LOW_AACUTE,
00243         A_LOW_ACIRCUMFLEX,
00244         A_LOW_ATILDE,
00245         A_LOW_ADIERESIS,
00246         A_LOW_ARING,
00247         A_LOW_AE,
00248         A_LOW_CCEDILLA,
00249         A_LOW_EGRAVE,
00250         A_LOW_EACUTE,
00251         A_LOW_ECIRCUMFLEX,
00252         A_LOW_EDIERESIS,
00253         A_LOW_IGRAVE,
00254         A_LOW_IACUTE,
00255         A_LOW_ICIRCUMFLEX,
00256         A_LOW_IDIERESIS,
00257         A_LOW_ETH,
00258         A_LOW_NTILDE,
00259         A_LOW_OGRAVE,
00260         A_LOW_OACUTE,
00261         A_LOW_OCIRCUMFLEX,
00262         A_LOW_OTILDE,
00263         A_LOW_ODIERESIS,
00264         A_DIVIDE,
00265         A_LOW_OSLASH,
00266         A_LOW_UGRAVE,
00267         A_LOW_UACUTE,
00268         A_LOW_UCIRCUMFLEX,
00269         A_LOW_UDIERESIS,
00270         A_LOW_YACUTE,
00271         A_LOW_THORN,
00272         A_LOW_YDIERESIS,
00273         
00274         A_JOY0,
00275         A_JOY1,
00276         A_JOY2,
00277         A_JOY3,
00278         A_JOY4,
00279         A_JOY5,
00280         A_JOY6,
00281         A_JOY7,
00282         A_JOY8,
00283         A_JOY9,
00284         A_JOY10,
00285         A_JOY11,
00286         A_JOY12,
00287         A_JOY13,
00288         A_JOY14,
00289         A_JOY15,
00290         A_JOY16,
00291         A_JOY17,
00292         A_JOY18,
00293         A_JOY19,
00294         A_JOY20,
00295         A_JOY21,
00296         A_JOY22,
00297         A_JOY23,
00298         A_JOY24,
00299         A_JOY25,
00300         A_JOY26,
00301         A_JOY27,
00302         A_JOY28,
00303         A_JOY29,
00304         A_JOY30,
00305         A_JOY31,
00306 
00307         A_AUX0,
00308         A_AUX1,
00309         A_AUX2,
00310         A_AUX3,
00311         A_AUX4,
00312         A_AUX5,
00313         A_AUX6,
00314         A_AUX7,
00315         A_AUX8,
00316         A_AUX9,
00317         A_AUX10,
00318         A_AUX11,
00319         A_AUX12,
00320         A_AUX13,
00321         A_AUX14,
00322         A_AUX15,
00323         A_AUX16,
00324         A_AUX17,
00325         A_AUX18,
00326         A_AUX19,
00327         A_AUX20,
00328         A_AUX21,
00329         A_AUX22,
00330         A_AUX23,
00331         A_AUX24,
00332         A_AUX25,
00333         A_AUX26,
00334         A_AUX27,
00335         A_AUX28,
00336         A_AUX29,
00337         A_AUX30,
00338         A_AUX31,
00339 
00340         MAX_KEYS
00341 } fakeAscii_t;
00342 
00343 
00344 // The menu code needs to get both key and char events, but
00345 // to avoid duplicating the paths, the char events are just
00346 // distinguished by or'ing in K_CHAR_FLAG (ugly)
00347 #define K_CHAR_FLAG             1024
00348 
00349 #endif