Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

PhxKeyboard.h

00001 
00003 //  This file is free software; you can redistribute it and/or
00004 //  modify it under the terms of the GNU General Public License
00005 //  as published by the Free Software Foundation; either version 2
00006 //  of the License, or (at your option) any later version.
00007 //
00008 //  This file is distributed in the hope that it will be useful,
00009 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00011 //  GNU General Public License for more details.
00012 //
00013 //  You should have received a copy of the GNU General Public License
00014 //  along with this program; if not, write to the Free Software
00015 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00016 //
00017 //  To view the licence online, go to: http://www.gnu.org/copyleft/gpl.html
00019 
00020 #if !defined( PHXKEYBOARD_H )
00021 #define PHXKEYBOARD_H
00022 
00023 // Note: These code values are copied from SDL (SDL_keysym.h) and renamed.
00024 //       On quick inspection, the SDL definitions match those used by OI.
00025 // From SDL:
00026 /* What we really want is a mapping of every raw key on the keyboard.
00027    To support international keyboards, we use the range 0xA1 - 0xFF
00028    as international virtual keycodes.  We'll follow in the footsteps of X11...
00029    The names of the keys
00030  */
00031  
00032 namespace Phx
00033 {
00034         typedef enum {
00035                 /* The keyboard syms have been cleverly chosen to map to ASCII */
00036                 PHXK_UNKNOWN      = 0,
00037                 PHXK_BACKSPACE    = 8,
00038                 PHXK_TAB          = 9,
00039                 PHXK_CLEAR        = 12,
00040                 PHXK_RETURN       = 13,
00041                 PHXK_PAUSE        = 19,
00042                 PHXK_ESCAPE       = 27,
00043                 PHXK_SPACE        = 32,
00044                 PHXK_EXCLAIM      = 33,
00045                 PHXK_QUOTEDBL     = 34,
00046                 PHXK_HASH         = 35,
00047                 PHXK_DOLLAR       = 36,
00048                 PHXK_AMPERSAND    = 38,
00049                 PHXK_QUOTE        = 39,
00050                 PHXK_LEFTPAREN    = 40,
00051                 PHXK_RIGHTPAREN   = 41,
00052                 PHXK_ASTERISK     = 42,
00053                 PHXK_PLUS         = 43,
00054                 PHXK_COMMA        = 44,
00055                 PHXK_MINUS        = 45,
00056                 PHXK_PERIOD       = 46,
00057                 PHXK_SLASH        = 47,
00058                 PHXK_0            = 48,
00059                 PHXK_1            = 49,
00060                 PHXK_2            = 50,
00061                 PHXK_3            = 51,
00062                 PHXK_4            = 52,
00063                 PHXK_5            = 53,
00064                 PHXK_6            = 54,
00065                 PHXK_7            = 55,
00066                 PHXK_8            = 56,
00067                 PHXK_9            = 57,
00068                 PHXK_COLON        = 58,
00069                 PHXK_SEMICOLON    = 59,
00070                 PHXK_LESS         = 60,
00071                 PHXK_EQUALS       = 61,
00072                 PHXK_GREATER      = 62,
00073                 PHXK_QUESTION     = 63,
00074                 PHXK_AT           = 64,
00075 
00076                 // Skip uppercase letters
00077 
00078                 PHXK_LEFTBRACKET  = 91,
00079                 PHXK_BACKSLASH    = 92,
00080                 PHXK_RIGHTBRACKET = 93,
00081                 PHXK_CARET        = 94,
00082                 PHXK_UNDERSCORE   = 95,
00083                 PHXK_BACKQUOTE    = 96,
00084                 PHXK_A            = 97,
00085                 PHXK_B            = 98,
00086                 PHXK_C            = 99,
00087                 PHXK_D            = 100,
00088                 PHXK_E            = 101,
00089                 PHXK_F            = 102,
00090                 PHXK_G            = 103,
00091                 PHXK_H            = 104,
00092                 PHXK_I            = 105,
00093                 PHXK_J            = 106,
00094                 PHXK_K            = 107,
00095                 PHXK_L            = 108,
00096                 PHXK_M            = 109,
00097                 PHXK_N            = 110,
00098                 PHXK_O            = 111,
00099                 PHXK_P            = 112,
00100                 PHXK_Q            = 113,
00101                 PHXK_R            = 114,
00102                 PHXK_S            = 115,
00103                 PHXK_T            = 116,
00104                 PHXK_U            = 117,
00105                 PHXK_V            = 118,
00106                 PHXK_W            = 119,
00107                 PHXK_X            = 120,
00108                 PHXK_Y            = 121,
00109                 PHXK_Z            = 122,
00110                 PHXK_DELETE       = 127,
00111                 
00112                 // End of ASCII mapped key symbols
00113 
00114                 // International keyboard symbols
00115 
00116                 PHXK_WORLD_0      = 160, /* 0xA0 */
00117                 PHXK_WORLD_1      = 161,
00118                 PHXK_WORLD_2      = 162,
00119                 PHXK_WORLD_3      = 163,
00120                 PHXK_WORLD_4      = 164,
00121                 PHXK_WORLD_5      = 165,
00122                 PHXK_WORLD_6      = 166,
00123                 PHXK_WORLD_7      = 167,
00124                 PHXK_WORLD_8      = 168,
00125                 PHXK_WORLD_9      = 169,
00126                 PHXK_WORLD_10     = 170,
00127                 PHXK_WORLD_11     = 171,
00128                 PHXK_WORLD_12     = 172,
00129                 PHXK_WORLD_13     = 173,
00130                 PHXK_WORLD_14     = 174,
00131                 PHXK_WORLD_15     = 175,
00132                 PHXK_WORLD_16     = 176,
00133                 PHXK_WORLD_17     = 177,
00134                 PHXK_WORLD_18     = 178,
00135                 PHXK_WORLD_19     = 179,
00136                 PHXK_WORLD_20     = 180,
00137                 PHXK_WORLD_21     = 181,
00138                 PHXK_WORLD_22     = 182,
00139                 PHXK_WORLD_23     = 183,
00140                 PHXK_WORLD_24     = 184,
00141                 PHXK_WORLD_25     = 185,
00142                 PHXK_WORLD_26     = 186,
00143                 PHXK_WORLD_27     = 187,
00144                 PHXK_WORLD_28     = 188,
00145                 PHXK_WORLD_29     = 189,
00146                 PHXK_WORLD_30     = 190,
00147                 PHXK_WORLD_31     = 191,
00148                 PHXK_WORLD_32     = 192,
00149                 PHXK_WORLD_33     = 193,
00150                 PHXK_WORLD_34     = 194,
00151                 PHXK_WORLD_35     = 195,
00152                 PHXK_WORLD_36     = 196,
00153                 PHXK_WORLD_37     = 197,
00154                 PHXK_WORLD_38     = 198,
00155                 PHXK_WORLD_39     = 199,
00156                 PHXK_WORLD_40     = 200,
00157                 PHXK_WORLD_41     = 201,
00158                 PHXK_WORLD_42     = 202,
00159                 PHXK_WORLD_43     = 203,
00160                 PHXK_WORLD_44     = 204,
00161                 PHXK_WORLD_45     = 205,
00162                 PHXK_WORLD_46     = 206,
00163                 PHXK_WORLD_47     = 207,
00164                 PHXK_WORLD_48     = 208,
00165                 PHXK_WORLD_49     = 209,
00166                 PHXK_WORLD_50     = 210,
00167                 PHXK_WORLD_51     = 211,
00168                 PHXK_WORLD_52     = 212,
00169                 PHXK_WORLD_53     = 213,
00170                 PHXK_WORLD_54     = 214,
00171                 PHXK_WORLD_55     = 215,
00172                 PHXK_WORLD_56     = 216,
00173                 PHXK_WORLD_57     = 217,
00174                 PHXK_WORLD_58     = 218,
00175                 PHXK_WORLD_59     = 219,
00176                 PHXK_WORLD_60     = 220,
00177                 PHXK_WORLD_61     = 221,
00178                 PHXK_WORLD_62     = 222,
00179                 PHXK_WORLD_63     = 223,
00180                 PHXK_WORLD_64     = 224,
00181                 PHXK_WORLD_65     = 225,
00182                 PHXK_WORLD_66     = 226,
00183                 PHXK_WORLD_67     = 227,
00184                 PHXK_WORLD_68     = 228,
00185                 PHXK_WORLD_69     = 229,
00186                 PHXK_WORLD_70     = 230,
00187                 PHXK_WORLD_71     = 231,
00188                 PHXK_WORLD_72     = 232,
00189                 PHXK_WORLD_73     = 233,
00190                 PHXK_WORLD_74     = 234,
00191                 PHXK_WORLD_75     = 235,
00192                 PHXK_WORLD_76     = 236,
00193                 PHXK_WORLD_77     = 237,
00194                 PHXK_WORLD_78     = 238,
00195                 PHXK_WORLD_79     = 239,
00196                 PHXK_WORLD_80     = 240,
00197                 PHXK_WORLD_81     = 241,
00198                 PHXK_WORLD_82     = 242,
00199                 PHXK_WORLD_83     = 243,
00200                 PHXK_WORLD_84     = 244,
00201                 PHXK_WORLD_85     = 245,
00202                 PHXK_WORLD_86     = 246,
00203                 PHXK_WORLD_87     = 247,
00204                 PHXK_WORLD_88     = 248,
00205                 PHXK_WORLD_89     = 249,
00206                 PHXK_WORLD_90     = 250,
00207                 PHXK_WORLD_91     = 251,
00208                 PHXK_WORLD_92     = 252,
00209                 PHXK_WORLD_93     = 253,
00210                 PHXK_WORLD_94     = 254,
00211                 PHXK_WORLD_95     = 255, /* 0xFF */
00212 
00213                 // Numeric keypad
00214 
00215                 PHXK_KP0          = 256,
00216                 PHXK_KP1          = 257,
00217                 PHXK_KP2          = 258,
00218                 PHXK_KP3          = 259,
00219                 PHXK_KP4          = 260,
00220                 PHXK_KP5          = 261,
00221                 PHXK_KP6          = 262,
00222                 PHXK_KP7          = 263,
00223                 PHXK_KP8          = 264,
00224                 PHXK_KP9          = 265,
00225                 PHXK_KP_PERIOD    = 266,
00226                 PHXK_KP_DIVIDE    = 267,
00227                 PHXK_KP_MULTIPLY  = 268,
00228                 PHXK_KP_MINUS     = 269,
00229                 PHXK_KP_PLUS      = 270,
00230                 PHXK_KP_ENTER     = 271,
00231                 PHXK_KP_EQUALS    = 272,
00232 
00233                 // Arrows + Home/End pad
00234 
00235                 PHXK_UP           = 273,
00236                 PHXK_DOWN         = 274,
00237                 PHXK_RIGHT        = 275,
00238                 PHXK_LEFT         = 276,
00239                 PHXK_INSERT       = 277,
00240                 PHXK_HOME         = 278,
00241                 PHXK_END          = 279,
00242                 PHXK_PAGEUP       = 280,
00243                 PHXK_PAGEDOWN     = 281,
00244 
00245                 // Function keys
00246 
00247                 PHXK_F1           = 282,
00248                 PHXK_F2           = 283,
00249                 PHXK_F3           = 284,
00250                 PHXK_F4           = 285,
00251                 PHXK_F5           = 286,
00252                 PHXK_F6           = 287,
00253                 PHXK_F7           = 288,
00254                 PHXK_F8           = 289,
00255                 PHXK_F9           = 290,
00256                 PHXK_F10          = 291,
00257                 PHXK_F11          = 292,
00258                 PHXK_F12          = 293,
00259                 PHXK_F13          = 294,
00260                 PHXK_F14          = 295,
00261                 PHXK_F15          = 296,
00262 
00263                 // Key state modifier keys
00264 
00265                 PHXK_NUMLOCK      = 300,
00266                 PHXK_CAPSLOCK     = 301,
00267                 PHXK_SCROLLOCK    = 302,
00268                 PHXK_RSHIFT       = 303,
00269                 PHXK_LSHIFT       = 304,
00270                 PHXK_RCTRL        = 305,
00271                 PHXK_LCTRL        = 306,
00272                 PHXK_RALT         = 307,
00273                 PHXK_LALT         = 308,
00274                 PHXK_RMETA        = 309,
00275                 PHXK_LMETA        = 310,
00276                 PHXK_LSUPER       = 311, // Left "Windows" key
00277                 PHXK_RSUPER       = 312, // Right "Windows" key
00278                 PHXK_MODE         = 313, // "Alt Gr" key
00279                 PHXK_COMPOSE      = 314, // Multi-key compose key
00280 
00281                 // Miscellaneous function keys
00282 
00283                 PHXK_HELP         = 315,
00284                 PHXK_PRINT        = 316,
00285                 PHXK_SYSREQ       = 317,
00286                 PHXK_BREAK        = 318,
00287                 PHXK_MENU         = 319,
00288                 PHXK_POWER        = 320, // Power Macintosh power key
00289                 PHXK_EURO         = 321, // Some european keyboards
00290                 PHXK_UNDO         = 322, // Atari keyboard has Undo
00291 
00292                 // Add any other keys here
00293         } PhxKey;
00294 }; // namespace Phx
00295 
00296 #endif // !defined( PHXKEYBOARD_H )

Generated on Mon Jul 10 19:45:28 2006 for Phoenix OSFS by  doxygen 1.4.2