D:/Programming/GUI Editor (Source)/KeyTable.h
00001
00002 #include "Common.h"
00003
00004
00005 #define MAME_KEY 0
00006 #define DI_KEY 1
00007 #define VIRTUAL_KEY 2
00008 #define ASCII_KEY 3
00009
00010 enum
00011 {
00012
00013 KEYCODE_A,
00014 KEYCODE_B,
00015 KEYCODE_C,
00016 KEYCODE_D,
00017 KEYCODE_E,
00018 KEYCODE_F,
00019 KEYCODE_G,
00020 KEYCODE_H,
00021 KEYCODE_I,
00022 KEYCODE_J,
00023 KEYCODE_K,
00024 KEYCODE_L,
00025 KEYCODE_M,
00026 KEYCODE_N,
00027 KEYCODE_O,
00028 KEYCODE_P,
00029 KEYCODE_Q,
00030 KEYCODE_R,
00031 KEYCODE_S,
00032 KEYCODE_T,
00033 KEYCODE_U,
00034 KEYCODE_V,
00035 KEYCODE_W,
00036 KEYCODE_X,
00037 KEYCODE_Y,
00038 KEYCODE_Z,
00039 KEYCODE_0,
00040 KEYCODE_1,
00041 KEYCODE_2,
00042 KEYCODE_3,
00043 KEYCODE_4,
00044 KEYCODE_5,
00045 KEYCODE_6,
00046 KEYCODE_7,
00047 KEYCODE_8,
00048 KEYCODE_9,
00049 KEYCODE_F1,
00050 KEYCODE_F2,
00051 KEYCODE_F3,
00052 KEYCODE_F4,
00053 KEYCODE_F5,
00054 KEYCODE_F6,
00055 KEYCODE_F7,
00056 KEYCODE_F8,
00057 KEYCODE_F9,
00058 KEYCODE_F10,
00059 KEYCODE_F11,
00060 KEYCODE_F12,
00061 KEYCODE_F13,
00062 KEYCODE_F14,
00063 KEYCODE_F15,
00064 KEYCODE_ESC,
00065 KEYCODE_TILDE,
00066 KEYCODE_MINUS,
00067 KEYCODE_EQUALS,
00068 KEYCODE_BACKSPACE,
00069 KEYCODE_TAB,
00070 KEYCODE_OPENBRACE,
00071 KEYCODE_CLOSEBRACE,
00072 KEYCODE_ENTER,
00073 KEYCODE_COLON,
00074 KEYCODE_QUOTE,
00075 KEYCODE_BACKSLASH,
00076 KEYCODE_BACKSLASH2,
00077 KEYCODE_COMMA,
00078 KEYCODE_STOP,
00079 KEYCODE_SLASH,
00080 KEYCODE_SPACE,
00081 KEYCODE_INSERT,
00082 KEYCODE_DEL,
00083 KEYCODE_HOME,
00084 KEYCODE_END,
00085 KEYCODE_PGUP,
00086 KEYCODE_PGDN,
00087 KEYCODE_LEFT,
00088 KEYCODE_RIGHT,
00089 KEYCODE_UP,
00090 KEYCODE_DOWN,
00091 KEYCODE_0_PAD,
00092 KEYCODE_1_PAD,
00093 KEYCODE_2_PAD,
00094 KEYCODE_3_PAD,
00095 KEYCODE_4_PAD,
00096 KEYCODE_5_PAD,
00097 KEYCODE_6_PAD,
00098 KEYCODE_7_PAD,
00099 KEYCODE_8_PAD,
00100 KEYCODE_9_PAD,
00101 KEYCODE_SLASH_PAD,
00102 KEYCODE_ASTERISK,
00103 KEYCODE_MINUS_PAD,
00104 KEYCODE_PLUS_PAD,
00105 KEYCODE_DEL_PAD,
00106 KEYCODE_ENTER_PAD,
00107 KEYCODE_PRTSCR,
00108 KEYCODE_PAUSE,
00109 KEYCODE_LSHIFT,
00110 KEYCODE_RSHIFT,
00111 KEYCODE_LCONTROL,
00112 KEYCODE_RCONTROL,
00113 KEYCODE_LALT,
00114 KEYCODE_RALT,
00115 KEYCODE_SCRLOCK,
00116 KEYCODE_NUMLOCK,
00117 KEYCODE_CAPSLOCK,
00118 KEYCODE_LWIN,
00119 KEYCODE_RWIN,
00120 KEYCODE_MENU,
00121 KEYCODE_OTHER
00122 };
00123
00124 #ifdef DIRECT_INPUT
00125
00126 static int giKeysTable[][4] =
00127 {
00128
00129 { KEYCODE_ESC, DIK_ESCAPE,VK_ESCAPE, 27 },
00130 { KEYCODE_1, DIK_1,'1','1' },
00131 { KEYCODE_2, DIK_2,'2','2' },
00132 { KEYCODE_3, DIK_3,'3','3' },
00133 { KEYCODE_4, DIK_4,'4','4' },
00134 { KEYCODE_5, DIK_5,'5','5' },
00135 { KEYCODE_6, DIK_6,'6','6' },
00136 { KEYCODE_7, DIK_7,'7','7' },
00137 { KEYCODE_8, DIK_8,'8','8' },
00138 { KEYCODE_9, DIK_9,'9','9' },
00139 { KEYCODE_0, DIK_0,'0','0' },
00140 { KEYCODE_MINUS, DIK_MINUS, 0xbd,'-' },
00141 { KEYCODE_EQUALS, DIK_EQUALS, 0xbb,'=' },
00142 { KEYCODE_BACKSPACE,DIK_BACK, VK_BACK, 8 },
00143 { KEYCODE_TAB, DIK_TAB, VK_TAB, 9 },
00144 { KEYCODE_Q, DIK_Q,'Q','Q' },
00145 { KEYCODE_W, DIK_W,'W','W' },
00146 { KEYCODE_E, DIK_E,'E','E' },
00147 { KEYCODE_R, DIK_R,'R','R' },
00148 { KEYCODE_T, DIK_T,'T','T' },
00149 { KEYCODE_Y, DIK_Y,'Y','Y' },
00150 { KEYCODE_U, DIK_U,'U','U' },
00151 { KEYCODE_I, DIK_I,'I','I' },
00152 { KEYCODE_O, DIK_O,'O','O' },
00153 { KEYCODE_P, DIK_P,'P','P' },
00154 { KEYCODE_OPENBRACE,DIK_LBRACKET, 0xdb,'[' },
00155 { KEYCODE_CLOSEBRACE,DIK_RBRACKET, 0xdd,']' },
00156 { KEYCODE_ENTER, DIK_RETURN, VK_RETURN, 13 },
00157 { KEYCODE_LCONTROL, DIK_LCONTROL, VK_CONTROL, 0 },
00158 { KEYCODE_A, DIK_A,'A','A' },
00159 { KEYCODE_S, DIK_S,'S','S' },
00160 { KEYCODE_D, DIK_D,'D','D' },
00161 { KEYCODE_F, DIK_F,'F','F' },
00162 { KEYCODE_G, DIK_G,'G','G' },
00163 { KEYCODE_H, DIK_H,'H','H' },
00164 { KEYCODE_J, DIK_J,'J','J' },
00165 { KEYCODE_K, DIK_K,'K','K' },
00166 { KEYCODE_L, DIK_L,'L','L' },
00167 { KEYCODE_COLON, DIK_SEMICOLON,0xba,';' },
00168 { KEYCODE_QUOTE, DIK_APOSTROPHE,0xde,'\'' },
00169 { KEYCODE_TILDE, DIK_GRAVE, 0xc0,'`' },
00170 { KEYCODE_LSHIFT, DIK_LSHIFT, VK_SHIFT, 0 },
00171 { KEYCODE_BACKSLASH,DIK_BACKSLASH, 0xdc,'\\' },
00172 { KEYCODE_Z, DIK_Z,'Z','Z' },
00173 { KEYCODE_X, DIK_X,'X','X' },
00174 { KEYCODE_C, DIK_C,'C','C' },
00175 { KEYCODE_V, DIK_V,'V','V' },
00176 { KEYCODE_B, DIK_B,'B','B' },
00177 { KEYCODE_N, DIK_N,'N','N' },
00178 { KEYCODE_M, DIK_M,'M','M' },
00179 { KEYCODE_COMMA, DIK_COMMA,0xbc,',' },
00180 { KEYCODE_STOP, DIK_PERIOD, 0xbe,'.' },
00181 { KEYCODE_SLASH, DIK_SLASH, 0xbf,'/' },
00182 { KEYCODE_RSHIFT, DIK_RSHIFT, VK_SHIFT, 0 },
00183 { KEYCODE_ASTERISK, DIK_MULTIPLY, VK_MULTIPLY,'*' },
00184 { KEYCODE_LALT, DIK_LMENU, VK_MENU, 0 },
00185 { KEYCODE_SPACE, DIK_SPACE, VK_SPACE,' ' },
00186 { KEYCODE_CAPSLOCK, DIK_CAPITAL, VK_CAPITAL, 0 },
00187 { KEYCODE_F1, DIK_F1,VK_F1, 0 },
00188 { KEYCODE_F2, DIK_F2,VK_F2, 0 },
00189 { KEYCODE_F3, DIK_F3,VK_F3, 0 },
00190 { KEYCODE_F4, DIK_F4,VK_F4, 0 },
00191 { KEYCODE_F5, DIK_F5,VK_F5, 0 },
00192 { KEYCODE_F6, DIK_F6,VK_F6, 0 },
00193 { KEYCODE_F7, DIK_F7,VK_F7, 0 },
00194 { KEYCODE_F8, DIK_F8,VK_F8, 0 },
00195 { KEYCODE_F9, DIK_F9,VK_F9, 0 },
00196 { KEYCODE_F10, DIK_F10,VK_F10, 0 },
00197 { KEYCODE_NUMLOCK, DIK_NUMLOCK,VK_NUMLOCK, 0 },
00198 { KEYCODE_SCRLOCK, DIK_SCROLL,VK_SCROLL, 0 },
00199 { KEYCODE_7_PAD, DIK_NUMPAD7,VK_NUMPAD7, 0 },
00200 { KEYCODE_8_PAD, DIK_NUMPAD8,VK_NUMPAD8, 0 },
00201 { KEYCODE_9_PAD, DIK_NUMPAD9,VK_NUMPAD9, 0 },
00202 { KEYCODE_MINUS_PAD,DIK_SUBTRACT,VK_SUBTRACT, 0 },
00203 { KEYCODE_4_PAD, DIK_NUMPAD4,VK_NUMPAD4, 0 },
00204 { KEYCODE_5_PAD, DIK_NUMPAD5,VK_NUMPAD5, 0 },
00205 { KEYCODE_6_PAD, DIK_NUMPAD6,VK_NUMPAD6, 0 },
00206 { KEYCODE_PLUS_PAD, DIK_ADD,VK_ADD, 0 },
00207 { KEYCODE_1_PAD, DIK_NUMPAD1,VK_NUMPAD1, 0 },
00208 { KEYCODE_2_PAD, DIK_NUMPAD2,VK_NUMPAD2, 0 },
00209 { KEYCODE_3_PAD, DIK_NUMPAD3,VK_NUMPAD3, 0 },
00210 { KEYCODE_0_PAD, DIK_NUMPAD0,VK_NUMPAD0, 0 },
00211 { KEYCODE_DEL_PAD, DIK_DECIMAL,VK_DECIMAL, 0 },
00212 { KEYCODE_F11, DIK_F11,VK_F11, 0 },
00213 { KEYCODE_F12, DIK_F12,VK_F12, 0 },
00214 { KEYCODE_OTHER, DIK_F13,VK_F13, 0 },
00215 { KEYCODE_OTHER, DIK_F14,VK_F14, 0 },
00216 { KEYCODE_OTHER, DIK_F15,VK_F15, 0 },
00217 { KEYCODE_ENTER_PAD,DIK_NUMPADENTER,VK_RETURN, 0 },
00218 { KEYCODE_RCONTROL, DIK_RCONTROL,VK_CONTROL, 0 },
00219 { KEYCODE_SLASH_PAD,DIK_DIVIDE,VK_DIVIDE, 0 },
00220 { KEYCODE_PRTSCR, DIK_SYSRQ, 0, 0 },
00221 { KEYCODE_RALT, DIK_RMENU,VK_MENU, 0 },
00222 { KEYCODE_HOME, DIK_HOME,VK_HOME, 0 },
00223 { KEYCODE_UP, DIK_UP,VK_UP, 0 },
00224 { KEYCODE_PGUP, DIK_PRIOR,VK_PRIOR, 0 },
00225 { KEYCODE_LEFT, DIK_LEFT,VK_LEFT, 0 },
00226 { KEYCODE_RIGHT, DIK_RIGHT,VK_RIGHT, 0 },
00227 { KEYCODE_END, DIK_END,VK_END, 0 },
00228 { KEYCODE_DOWN, DIK_DOWN,VK_DOWN, 0 },
00229 { KEYCODE_PGDN, DIK_NEXT,VK_NEXT, 0 },
00230 { KEYCODE_INSERT, DIK_INSERT,VK_INSERT, 0 },
00231 { KEYCODE_DEL, DIK_DELETE,VK_DELETE, 0 },
00232 { KEYCODE_LWIN, DIK_LWIN,VK_LWIN, 0 },
00233 { KEYCODE_RWIN, DIK_RWIN,VK_RWIN, 0 },
00234 { KEYCODE_MENU, DIK_APPS,VK_APPS, 0 }
00235 };
00236
00237 #endif
Generated on Sun Jul 17 21:34:27 2005 for OpenGL GUI by
1.3.8