- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ukeysym.hpp

00001 /*************************************************************************** 00002 LibUFO - UI For OpenGL 00003 copyright : (C) 2001-2005 by Johannes Schmidt 00004 email : schmidtjf at users.sourceforge.net 00005 ------------------- 00006 00007 file : include/ufo/events/ukeysym.hpp 00008 begin : Sat Jan 12 2002 00009 $Id: ukeysym.hpp,v 1.10 2005/05/21 15:18:33 schmidtjf Exp $ 00010 ***************************************************************************/ 00011 00012 /*************************************************************************** 00013 * This library is free software; you can redistribute it and/or * 00014 * modify it under the terms of the GNU Lesser General Public * 00015 * License as published by the Free Software Foundation; either * 00016 * version 2.1 of the License, or (at your option) any later version. * 00017 * * 00018 * This library is distributed in the hope that it will be useful, * 00019 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00020 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00021 * Lesser General Public License for more details. * 00022 * * 00023 * You should have received a copy of the GNU Lesser General Public * 00024 * License along with this library; if not, write to the Free Software * 00025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 00026 ***************************************************************************/ 00027 00028 #ifndef UKEYSYM_HPP 00029 #define UKEYSYM_HPP 00030 00031 00032 namespace ufo { 00033 00034 // 00035 00036 namespace UKey { 00037 /* Virtual key codes. */ 00038 00039 /*These key syms are nearly the same like the SDLK_ defines 00040 *The keyboard syms have been cleverly chosen to map to ASCII 00041 */ 00042 00047 enum KeyCode { 00049 UK_UNKOWN = 0x00, 00050 UK_UNKNOWN = 0x00, 00051 UK_UNDEFINED = 0x00, 00052 UK_BACKSPACE = 0x08, 00053 UK_TAB = 0x09, 00054 UK_CLEAR = 0x0c, 00055 UK_RETURN = 0x0d, 00056 UK_PAUSE = 0x13, 00057 UK_ESCAPE = 0x1B, 00058 UK_SPACE = 0x20, 00060 UK_EXCLAMATION_MARK = 0x21, 00062 UK_QUOTEDBL = 0x22, 00064 UK_HASH = 0x23, 00065 UK_DOLLAR = 0x24, 00067 UK_PERCENT = 0x24, 00068 UK_AMPERSAND = 0x26, 00070 UK_QUOTE = 0x27, 00072 UK_LEFT_PARENTHESIS = 0x28, 00074 UK_RIGHT_PARENTHESIS = 0x29, 00076 UK_ASTERISK = 0x2A, 00077 UK_PLUS = 0x2B, 00078 UK_COMMA = 0x2C, 00079 UK_MINUS = 0x2D, 00080 UK_PERIOD = 0x2E, 00081 UK_SLASH = 0x2F, 00082 00083 UK_0 = 0x30, 00084 UK_1 = 0x31, 00085 UK_2 = 0x32, 00086 UK_3 = 0x33, 00087 UK_4 = 0x34, 00088 UK_5 = 0x35, 00089 UK_6 = 0x36, 00090 UK_7 = 0x37, 00091 UK_8 = 0x38, 00092 UK_9 = 0x39, 00093 00094 UK_COLON = 0x3A, 00095 UK_SEMICOLON = 0x3B, 00096 UK_LESS = 0x3C, 00097 UK_EQUALS = 0x3D, 00098 UK_GREATER = 0x3E, 00099 UK_QUESTION = 0x3F, 00100 UK_AT = 0x40, 00101 00102 UK_A = 0x41, 00103 UK_B = 0x42, 00104 UK_C = 0x43, 00105 UK_D = 0x44, 00106 UK_E = 0x45, 00107 UK_F = 0x46, 00108 UK_G = 0x47, 00109 UK_H = 0x48, 00110 UK_I = 0x49, 00111 UK_J = 0x4A, 00112 UK_K = 0x4B, 00113 UK_L = 0x4C, 00114 UK_M = 0x4D, 00115 UK_N = 0x4E, 00116 UK_O = 0x4F, 00117 UK_P = 0x50, 00118 UK_Q = 0x51, 00119 UK_R = 0x52, 00120 UK_S = 0x53, 00121 UK_T = 0x54, 00122 UK_U = 0x55, 00123 UK_V = 0x56, 00124 UK_W = 0x57, 00125 UK_X = 0x58, 00126 UK_Y = 0x59, 00127 UK_Z = 0x5A, 00128 00129 UK_LEFT_BRACKET = 0x5B, 00130 UK_BACKSLASH = 0x5C, 00131 UK_RIGHT_BRACKET = 0x5D, 00133 UK_CARET = 0x5E, 00134 UK_UNDERSCORE = 0x5F, 00136 UK_BACKQUOTE = 0x60, 00137 /* skip lower case letters (unlike SDL, but more like java) */ 00138 /* 00139 UK_a = 97, 00140 UK_b = 98, 00141 UK_c = 99, 00142 UK_d = 100, 00143 UK_e = 101, 00144 UK_f = 102, 00145 UK_g = 103, 00146 UK_h = 104, 00147 UK_i = 105, 00148 UK_j = 106, 00149 UK_k = 107, 00150 UK_l = 108, 00151 UK_m = 109, 00152 UK_n = 110, 00153 UK_o = 111, 00154 UK_p = 112, 00155 UK_q = 113, 00156 UK_r = 114, 00157 UK_s = 115, 00158 UK_t = 116, 00159 UK_u = 117, 00160 UK_v = 118, 00161 UK_w = 119, 00162 UK_x = 120, 00163 UK_y = 121, 00164 UK_z = 122, 00165 */ 00168 UK_LEFT_CURLY_BRACKET = 0x7B, 00169 00172 UK_V_LINE = 0x7C, 00175 UK_RIGHT_CURLY_BRACKET = 0x7D, 00177 UK_TILDE = 0x7E, 00178 00179 UK_DELETE = 0x7F, 00180 /* End of ASCII mapped keysyms */ 00181 00183 UK_WORLD_0 = 0xA0, 00184 UK_WORLD_1 = 0xA1, 00185 UK_WORLD_2 = 0xA2, 00186 UK_WORLD_3 = 0xA3, 00187 UK_WORLD_4 = 0xA4, 00188 UK_WORLD_5 = 0xA5, 00189 UK_WORLD_6 = 0xA6, 00190 UK_WORLD_7 = 0xA7, 00191 UK_WORLD_8 = 0xA8, 00192 UK_WORLD_9 = 0xA9, 00193 UK_WORLD_10 = 0xAA, 00194 UK_WORLD_11 = 0xAB, 00195 UK_WORLD_12 = 0xAC, 00196 UK_WORLD_13 = 0xAD, 00197 UK_WORLD_14 = 0xAE, 00198 UK_WORLD_15 = 0xAF, 00199 UK_WORLD_16 = 0xB0, 00200 UK_WORLD_17 = 0xB1, 00201 UK_WORLD_18 = 0xB2, 00202 UK_WORLD_19 = 0xB3, 00203 UK_WORLD_20 = 0xB4, 00204 UK_WORLD_21 = 0xB5, 00205 UK_WORLD_22 = 0xB6, 00206 UK_WORLD_23 = 0xB7, 00207 UK_WORLD_24 = 0xB8, 00208 UK_WORLD_25 = 0xB9, 00209 UK_WORLD_26 = 0xBA, 00210 UK_WORLD_27 = 0xBB, 00211 UK_WORLD_28 = 0xBC, 00212 UK_WORLD_29 = 0xBD, 00213 UK_WORLD_30 = 0xBE, 00214 UK_WORLD_31 = 0xBF, 00215 UK_WORLD_32 = 0xC0, 00216 UK_WORLD_33 = 0xC1, 00217 UK_WORLD_34 = 0xC2, 00218 UK_WORLD_35 = 0xC3, 00219 UK_WORLD_36 = 0xC4, 00220 UK_WORLD_37 = 0xC5, 00221 UK_WORLD_38 = 0xC6, 00222 UK_WORLD_39 = 0xC7, 00223 UK_WORLD_40 = 0xC8, 00224 UK_WORLD_41 = 0xC9, 00225 UK_WORLD_42 = 0xCA, 00226 UK_WORLD_43 = 0xCB, 00227 UK_WORLD_44 = 0xCC, 00228 UK_WORLD_45 = 0xCD, 00229 UK_WORLD_46 = 0xCE, 00230 UK_WORLD_47 = 0xCF, 00231 UK_WORLD_48 = 0xD0, 00232 UK_WORLD_49 = 0xD1, 00233 UK_WORLD_50 = 0xD2, 00234 UK_WORLD_51 = 0xD3, 00235 UK_WORLD_52 = 0xD4, 00236 UK_WORLD_53 = 0xD5, 00237 UK_WORLD_54 = 0xD6, 00238 UK_WORLD_55 = 0xD7, 00239 UK_WORLD_56 = 0xD8, 00240 UK_WORLD_57 = 0xD9, 00241 UK_WORLD_58 = 0xDA, 00242 UK_WORLD_59 = 0xDB, 00243 UK_WORLD_60 = 0xDC, 00244 UK_WORLD_61 = 0xDD, 00245 UK_WORLD_62 = 0xDE, 00246 UK_WORLD_63 = 0xDF, 00247 UK_WORLD_64 = 0xE0, 00248 UK_WORLD_65 = 0xE1, 00249 UK_WORLD_66 = 0xE2, 00250 UK_WORLD_67 = 0xE3, 00251 UK_WORLD_68 = 0xE4, 00252 UK_WORLD_69 = 0xE5, 00253 UK_WORLD_70 = 0xE6, 00254 UK_WORLD_71 = 0xE7, 00255 UK_WORLD_72 = 0xE8, 00256 UK_WORLD_73 = 0xE9, 00257 UK_WORLD_74 = 0xEA, 00258 UK_WORLD_75 = 0xEB, 00259 UK_WORLD_76 = 0xEC, 00260 UK_WORLD_77 = 0xED, 00261 UK_WORLD_78 = 0xEE, 00262 UK_WORLD_79 = 0xEF, 00263 UK_WORLD_80 = 0xF0, 00264 UK_WORLD_81 = 0xF1, 00265 UK_WORLD_82 = 0xF2, 00266 UK_WORLD_83 = 0xF3, 00267 UK_WORLD_84 = 0xF4, 00268 UK_WORLD_85 = 0xF5, 00269 UK_WORLD_86 = 0xF6, 00270 UK_WORLD_87 = 0xF7, 00271 UK_WORLD_88 = 0xF8, 00272 UK_WORLD_89 = 0xF9, 00273 UK_WORLD_90 = 0xFA, 00274 UK_WORLD_91 = 0xFB, 00275 UK_WORLD_92 = 0xFC, 00276 UK_WORLD_93 = 0xFD, 00277 UK_WORLD_94 = 0xFE, 00278 UK_WORLD_95 = 0xFF, 00279 /* End of SDL mapped keysyms */ 00280 00281 00282 /* Numeric keypad */ 00283 UK_KP0 = 0x0200, 00284 UK_KP1 = 0x0201, 00285 UK_KP2 = 0x0202, 00286 UK_KP3 = 0x0203, 00287 UK_KP4 = 0x0204, 00288 UK_KP5 = 0x0205, 00289 UK_KP6 = 0x0206, 00290 UK_KP7 = 0x0207, 00291 UK_KP8 = 0x0208, 00292 UK_KP9 = 0x0209, 00293 00294 UK_KP_PERIOD = 0x020A, 00295 UK_KP_DIVIDE = 0x020B, 00296 UK_KP_MULTIPLY = 0x020C, 00297 UK_KP_MINUS = 0x020D, 00298 UK_KP_PLUS = 0x020E, 00299 UK_KP_ENTER = 0x020F, 00300 UK_KP_EQUALS = 0x0210, 00301 00302 UK_KP_UP = 0x0211, 00303 UK_KP_DOWN = 0x0212, 00304 UK_KP_RIGHT = 0x0213, 00305 UK_KP_LEFT = 0x0214, 00306 00307 UK_KP_INSERT = 0x0215, 00308 UK_KP_HOME = 0x0216, 00309 UK_KP_END = 0x0217, 00310 UK_KP_PAGEUP = 0x0218, 00311 UK_KP_PAGEDOWN = 0x0219, 00312 00314 UK_UP = 0x0230, 00315 UK_DOWN = 0x0231, 00316 UK_RIGHT = 0x0232, 00317 UK_LEFT = 0x0233, 00318 00319 UK_INSERT = 0x0234, 00320 UK_HOME = 0x0235, 00321 UK_END = 0x0236, 00322 UK_PAGEUP = 0x0237, 00323 UK_PAGEDOWN = 0x0238, 00324 00326 UK_F1 = 0x0300, 00327 UK_F2 = 0x0301, 00328 UK_F3 = 0x0302, 00329 UK_F4 = 0x0303, 00330 UK_F5 = 0x0304, 00331 UK_F6 = 0x0305, 00332 UK_F7 = 0x0306, 00333 UK_F8 = 0x0307, 00334 UK_F9 = 0x0308, 00335 UK_F10 = 0x0309, 00336 UK_F11 = 0x030A, 00337 UK_F12 = 0x030B, 00338 UK_F13 = 0x030C, 00339 UK_F14 = 0x030D, 00340 UK_F15 = 0x030E, 00341 UK_F16 = 0x030F, 00342 UK_F17 = 0x0310, 00343 UK_F18 = 0x0311, 00344 UK_F19 = 0x0312, 00345 UK_F20 = 0x0313, 00346 UK_F21 = 0x0314, 00347 UK_F22 = 0x0315, 00348 UK_F23 = 0x0316, 00349 UK_F24 = 0x0317, 00350 00352 UK_NUMLOCK = 0xF000, 00353 UK_CAPSLOCK = 0xF002, 00354 UK_SCROLLOCK = 0xF003, 00355 UK_RSHIFT = 0xF004, 00356 UK_LSHIFT = 0xF005, 00357 UK_RCTRL = 0xF006, 00358 UK_LCTRL = 0xF007, 00359 UK_RALT = 0xF008, 00360 UK_LALT = 0xF009, 00361 UK_RMETA = 0xF00A, 00362 UK_LMETA = 0xF00B, 00364 UK_LSUPER = 0xF00C, 00366 UK_RSUPER = 0xF00D, 00368 UK_MODE = 0xF00E, 00369 UK_ALT_GRAPH = 0xF00E, 00371 UK_COMPOSE = 0xF00F, 00372 00374 UK_HELP = 0xF020, 00375 UK_PRINT = 0xF021, 00376 UK_SYSREQ = 0xF022, 00377 UK_BREAK = 0xF023, 00378 UK_MENU = 0xF024, 00380 UK_POWER = 0xF025, 00382 UK_EURO = 0xF026, 00383 UK_LAST = UK_EURO 00384 }; 00385 } // namespace UKey 00386 00387 typedef UKey::KeyCode UKeyCode_t; 00388 00389 00390 namespace UMod { 00391 enum Modifier { 00392 NoModifier = 0x00000000, 00393 NoButton = NoModifier, 00394 00395 Shift = 0x0001, 00396 Ctrl = 0x0002, 00397 Alt = 0x0004, 00398 Meta = 0x0008, 00399 Super = 0x0010, 00400 00401 Num = 0x0020, 00402 Caps = 0x0040, 00403 AltGraph = 0x0080, 00404 00406 MouseButton1 = 0x0100, 00407 MouseButton2 = 0x0200, 00408 MouseButton3 = 0x0400, 00409 MouseButton4 = 0x0800, 00410 MouseButton5 = 0x1000, 00411 LeftButton = MouseButton1, 00412 MiddleButton = MouseButton2, 00413 RightButton = MouseButton3, 00414 00415 KeyboardModifierMask = 0x00ff, 00416 MouseModifierMask = 0xff00, 00417 MouseButtonMask = MouseModifierMask 00418 }; 00419 } // namespace UMod 00420 00421 00422 typedef UMod::Modifier UMod_t; 00423 00424 } // namespace ufo 00425 00426 #endif // UKEYSYM_HPP

The libUFO Project - written by Johannes Schmidt