00001
00002
00003
00004
00005
00006
00007
00008 #ifndef __SP_INPUTOUTPUT_KEYCODES_H__
00009 #define __SP_INPUTOUTPUT_KEYCODES_H__
00010
00011
00012 #include "Base/spStandard.hpp"
00013
00014
00015 namespace sp
00016 {
00017 namespace io
00018 {
00019
00020
00021 #ifdef SP_COMPILE_WITH_XBOX360GAMEPAD
00022
00024 enum EGamePadButtons
00025 {
00026 GAMEPAD_BUTTON_DPAD_UP = 0,
00027 GAMEPAD_BUTTON_DPAD_DOWN,
00028 GAMEPAD_BUTTON_DPAD_LEFT,
00029 GAMEPAD_BUTTON_DPAD_RIGHT,
00030 GAMEPAD_BUTTON_START,
00031 GAMEPAD_BUTTON_BACK,
00032 GAMEPAD_BUTTON_LEFT_JOYSTICK,
00033 GAMEPAD_BUTTON_RIGHT_JOYSTICK,
00034 GAMEPAD_BUTTON_LEFT_SHOULDER,
00035 GAMEPAD_BUTTON_RIGHT_SHOULDER,
00036 GAMEPAD_BUTTON_A,
00037 GAMEPAD_BUTTON_B,
00038 GAMEPAD_BUTTON_X,
00039 GAMEPAD_BUTTON_Y,
00040
00041 GAMEPAD_BUTTON_COUNT,
00042 };
00043
00044 #endif
00045
00046 #if defined(SP_PLATFORM_WINDOWS) || defined(SP_PLATFORM_LINUX)
00047
00049 enum EInputTypes
00050 {
00051 INPUTTYPE_KEYBOARD = 0x01,
00052 INPUTTYPE_MOUSE = 0x02,
00053 INPUTTYPE_MOUSEWHEEL = 0x04,
00054 INPUTTYPE_JOYSTICK = 0x08,
00055
00056 #ifdef SP_COMPILE_WITH_XBOX360GAMEPAD
00057 INPUTTYPE_GAMEPAD = 0x10,
00058 #endif
00059
00060 INPUTTYPE_ANY = ~0,
00061 };
00062
00064 enum EMouseKeyCodes
00065 {
00066 MOUSE_LEFT = 0,
00067 MOUSE_MIDDLE,
00068 MOUSE_RIGHT,
00069 MOUSE_XBUTTON1,
00070 MOUSE_XBUTTON2,
00071 };
00072
00074 enum EMouseWheelMotions
00075 {
00076 MOUSEWHEEL_NONE = 0,
00077 MOUSEWHEEL_UP = 1,
00078 MOUSEWHEEL_DOWN = -1,
00079 };
00080
00082 enum EJoystickKeyCodes
00083 {
00084 JOYSTICK_KEY1 = 1,
00085 JOYSTICK_KEY2,
00086 JOYSTICK_KEY3,
00087 JOYSTICK_KEY4,
00088 JOYSTICK_KEY5,
00089 JOYSTICK_KEY6,
00090 JOYSTICK_KEY7,
00091 JOYSTICK_KEY8,
00092 JOYSTICK_KEY9,
00093 JOYSTICK_KEY10,
00094 JOYSTICK_KEY11,
00095 JOYSTICK_KEY12,
00096 JOYSTICK_KEY13,
00097 JOYSTICK_KEY14,
00098 JOYSTICK_KEY15,
00099 JOYSTICK_KEY16,
00100 };
00101
00103 enum EKeyCodes
00104 {
00105 KEY_LBUTTON = 0x01,
00106 KEY_RBUTTON = 0x02,
00107 KEY_CANCEL = 0x03,
00108 KEY_MBUTTON = 0x04,
00109 KEY_XBUTTON1 = 0x05,
00110 KEY_XBUTTON2 = 0x06,
00111 KEY_BACK = 0x08,
00112 KEY_TAB = 0x09,
00113 KEY_CLEAR = 0x0C,
00114 KEY_RETURN = 0x0D,
00115 KEY_SHIFT = 0x10,
00116 KEY_CONTROL = 0x11,
00117 KEY_MENU = 0x12,
00118 KEY_PAUSE = 0x13,
00119 KEY_CAPITAL = 0x14,
00120 KEY_KANA = 0x15,
00121 KEY_HANGUEL = 0x15,
00122 KEY_HANGUL = 0x15,
00123 KEY_JUNJA = 0x17,
00124 KEY_FINAL = 0x18,
00125 KEY_HANJA = 0x19,
00126 KEY_KANJI = 0x19,
00127
00128 KEY_ESCAPE = 0x1B,
00129 KEY_SPACE = 0x20,
00130 KEY_PAGEUP = 0x21,
00131 KEY_PAGEDOWN = 0x22,
00132 KEY_END = 0x23,
00133 KEY_HOME = 0x24,
00134 KEY_LEFT = 0x25,
00135 KEY_UP = 0x26,
00136 KEY_RIGHT = 0x27,
00137 KEY_DOWN = 0x28,
00138 KEY_SELECT = 0x29,
00139 KEY_EXE = 0x2B,
00140 KEY_SNAPSHOT = 0x2C,
00141 KEY_INSERT = 0x2D,
00142 KEY_DELETE = 0x2E,
00143 KEY_HELP = 0x2F,
00144
00145 KEY_0 = 0x30,
00146 KEY_1 = 0x31,
00147 KEY_2 = 0x32,
00148 KEY_3 = 0x33,
00149 KEY_4 = 0x34,
00150 KEY_5 = 0x35,
00151 KEY_6 = 0x36,
00152 KEY_7 = 0x37,
00153 KEY_8 = 0x38,
00154 KEY_9 = 0x39,
00155
00156 KEY_A = 0x41,
00157 KEY_B = 0x42,
00158 KEY_C = 0x43,
00159 KEY_D = 0x44,
00160 KEY_E = 0x45,
00161 KEY_F = 0x46,
00162 KEY_G = 0x47,
00163 KEY_H = 0x48,
00164 KEY_I = 0x49,
00165 KEY_J = 0x4A,
00166 KEY_K = 0x4B,
00167 KEY_L = 0x4C,
00168 KEY_M = 0x4D,
00169 KEY_N = 0x4E,
00170 KEY_O = 0x4F,
00171 KEY_P = 0x50,
00172 KEY_Q = 0x51,
00173 KEY_R = 0x52,
00174 KEY_S = 0x53,
00175 KEY_T = 0x54,
00176 KEY_U = 0x55,
00177 KEY_V = 0x56,
00178 KEY_W = 0x57,
00179 KEY_X = 0x58,
00180 KEY_Y = 0x59,
00181 KEY_Z = 0x5A,
00182
00183 KEY_WINLEFT = 0x5B,
00184 KEY_WINRIGHT = 0x5C,
00185 KEY_APPS = 0x5D,
00186
00187 KEY_NUMPAD0 = 0x60,
00188 KEY_NUMPAD1 = 0x61,
00189 KEY_NUMPAD2 = 0x62,
00190 KEY_NUMPAD3 = 0x63,
00191 KEY_NUMPAD4 = 0x64,
00192 KEY_NUMPAD5 = 0x65,
00193 KEY_NUMPAD6 = 0x66,
00194 KEY_NUMPAD7 = 0x67,
00195 KEY_NUMPAD8 = 0x68,
00196 KEY_NUMPAD9 = 0x69,
00197
00198 KEY_MULTIPLY = 0x6A,
00199 KEY_ADD = 0x6B,
00200 KEY_SEPARATOR = 0x6C,
00201 KEY_SUBTRACT = 0x6D,
00202 KEY_DECIMAL = 0x6E,
00203 KEY_DIVIDE = 0x6F,
00204
00205 KEY_F1 = 0x70,
00206 KEY_F2 = 0x71,
00207 KEY_F3 = 0x72,
00208 KEY_F4 = 0x73,
00209 KEY_F5 = 0x74,
00210 KEY_F6 = 0x75,
00211 KEY_F7 = 0x76,
00212 KEY_F8 = 0x77,
00213 KEY_F9 = 0x78,
00214 KEY_F10 = 0x79,
00215 KEY_F11 = 0x7A,
00216 KEY_F12 = 0x7B,
00217 KEY_F13 = 0x7C,
00218 KEY_F14 = 0x7D,
00219 KEY_F15 = 0x7E,
00220 KEY_F16 = 0x7F,
00221 KEY_F17 = 0x80,
00222 KEY_F18 = 0x81,
00223 KEY_F19 = 0x82,
00224 KEY_F20 = 0x83,
00225 KEY_F21 = 0x84,
00226 KEY_F22 = 0x85,
00227 KEY_F23 = 0x86,
00228 KEY_F24 = 0x87,
00229
00230 KEY_NUMLOCK = 0x90,
00231 KEY_SCROLL = 0x91,
00232
00233 KEY_LSHIFT = 0xA0,
00234 KEY_RSHIFT = 0xA1,
00235 KEY_LCONTROL = 0xA2,
00236 KEY_RCONTROL = 0xA3,
00237 KEY_LMENU = 0xA4,
00238 KEY_RMENU = 0xA5,
00239
00240 KEY_PLUS = 0xBB,
00241 KEY_COMMA = 0xBC,
00242 KEY_MINUS = 0xBD,
00243 KEY_PERIOD = 0xBE,
00244
00245 KEY_EXPONENT = 0xDC,
00246
00247 KEY_ANY = 0xF0,
00248
00249 KEY_ATTN = 0xF6,
00250 KEY_CRSEL = 0xF7,
00251 KEY_EXSEL = 0xF8,
00252 KEY_EREOF = 0xF9,
00253 KEY_PLAY = 0xFA,
00254 KEY_ZOOM = 0xFB,
00255 KEY_NONAME = 0xFC,
00256 KEY_PA1 = 0xFD,
00257 KEY_OEMCLEAR = 0xFE,
00258 };
00259
00260 #elif defined(SP_PLATFORM_ANDROID)
00261
00262 enum EKeyCodes
00263 {
00264 KEY_UNKNOWN = 0,
00265 KEY_SOFT_LEFT,
00266 KEY_SOFT_RIGHT,
00267 KEY_HOME,
00268 KEY_BACK,
00269 KEY_CALL,
00270 KEY_ENDCALL,
00271 KEY_0,
00272 KEY_1,
00273 KEY_2,
00274 KEY_3,
00275 KEY_4,
00276 KEY_5,
00277 KEY_6,
00278 KEY_7,
00279 KEY_8,
00280 KEY_9,
00281 KEY_STAR,
00282 KEY_POUND,
00283 KEY_DPAD_UP,
00284 KEY_DPAD_DOWN,
00285 KEY_DPAD_LEFT,
00286 KEY_DPAD_RIGHT,
00287 KEY_DPAD_CENTER,
00288 KEY_VOLUME_UP,
00289 KEY_VOLUME_DOWN,
00290 KEY_POWER,
00291 KEY_CAMERA,
00292 KEY_CLEAR,
00293 KEY_A,
00294 KEY_B,
00295 KEY_C,
00296 KEY_D,
00297 KEY_E,
00298 KEY_F,
00299 KEY_G,
00300 KEY_H,
00301 KEY_I,
00302 KEY_J,
00303 KEY_K,
00304 KEY_L,
00305 KEY_M,
00306 KEY_N,
00307 KEY_O,
00308 KEY_P,
00309 KEY_Q,
00310 KEY_R,
00311 KEY_S,
00312 KEY_T,
00313 KEY_U,
00314 KEY_V,
00315 KEY_W,
00316 KEY_X,
00317 KEY_Y,
00318 KEY_Z,
00319 KEY_COMMA,
00320 KEY_PERIOD,
00321 KEY_ALT_LEFT,
00322 KEY_ALT_RIGHT,
00323 KEY_SHIFT_LEFT,
00324 KEY_SHIFT_RIGHT,
00325 KEY_TAB,
00326 KEY_SPACE,
00327 KEY_SYM,
00328 KEY_EXPLORER,
00329 KEY_ENVELOPE,
00330 KEY_ENTER,
00331 KEY_DEL,
00332 KEY_GRAVE,
00333 KEY_MINUS,
00334 KEY_EQUALS,
00335 KEY_LEFT_BRACKET,
00336 KEY_RIGHT_BRACKET,
00337 KEY_BACKSLASH,
00338 KEY_SEMICOLON,
00339 KEY_APOSTROPHE,
00340 KEY_SLASH,
00341 KEY_AT,
00342 KEY_NUM,
00343 KEY_HEADSETHOOK,
00344 KEY_FOCUS,
00345 KEY_PLUS,
00346 KEY_MENU,
00347 KEY_NOTIFICATION,
00348 KEY_SEARCH,
00349 KEY_MEDIA_PLAY_PAUSE,
00350 KEY_MEDIA_STOP,
00351 KEY_MEDIA_NEXT,
00352 KEY_MEDIA_PREVIOUS,
00353 KEY_MEDIA_REWIND,
00354 KEY_MEDIA_FAST_FORWARD,
00355 KEY_MUTE,
00356 KEY_PAGEUP,
00357 KEY_PAGEDOWN,
00358 KEY_PICTSYMBOLS,
00359 KEY_SWITCH_CHARSET,
00360 KEY_BUTTON_A,
00361 KEY_BUTTON_B,
00362 KEY_BUTTON_C,
00363 KEY_BUTTON_X,
00364 KEY_BUTTON_Y,
00365 KEY_BUTTON_Z,
00366 KEY_BUTTON_L1,
00367 KEY_BUTTON_R1,
00368 KEY_BUTTON_L2,
00369 KEY_BUTTON_R2,
00370 KEY_BUTTON_THUMBL,
00371 KEY_BUTTON_THUMBR,
00372 KEY_BUTTON_START,
00373 KEY_BUTTON_SELECT,
00374 KEY_BUTTON_MODE,
00375 };
00376
00377 #endif
00378
00379
00380 }
00381
00382 }
00383
00384
00385 #endif
00386
00387
00388
00389