HIDKeys.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 2003-2005 The Pentagram team
00003 
00004 This program is free software; you can redistribute it and/or
00005 modify it under the terms of the GNU General Public License
00006 as published by the Free Software Foundation; either version 2
00007 of the License, or (at your option) any later version.
00008 
00009 This program is distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 GNU General Public License for more details.
00013 
00014 You should have received a copy of the GNU General Public License
00015 along with this program; if not, write to the Free Software
00016 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00017 */
00018 
00019 #ifndef HIDKEYS_H
00020 #define HIDKEYS_H
00021 
00022 #include "SDL_events.h"
00023 
00024 enum HID_Key {
00025         HID_FIRST = 0,
00026 
00027         HID_BACKSPACE = '\b',
00028         HID_TAB = '\t',
00029         HID_ENTER = '\n',
00030 
00031         HID_SPACE = ' ',
00032         HID_EXCLAIM = '!',
00033         HID_DOUBLEQUOTE = '\"',
00034         HID_HASH = '#',
00035         HID_DOLLAR = '$',
00036         HID_PERCENT = '%',
00037         HID_AMPERSAND = '&',
00038         HID_QUOTE = '\'',
00039         HID_LEFTPAREN = '(',
00040         HID_RIGHTPAREN = ')',
00041         HID_ASTERISK = '*',
00042         HID_PLUS = '+',
00043         HID_COMMA = ',',
00044         HID_MINUS = '-',
00045         HID_PERIOD = '.',
00046         HID_SLASH = '/',
00047 
00048         HID_0 = '0',
00049         HID_1 = '1',
00050         HID_2 = '2',
00051         HID_3 = '3',
00052         HID_4 = '4',
00053         HID_5 = '5',
00054         HID_6 = '6',
00055         HID_7 = '7',
00056         HID_8 = '8',
00057         HID_9 = '9',
00058 
00059         HID_COLON = ':',
00060         HID_SEMICOLON = ';',
00061         HID_LEFTANGLE = '<',
00062         HID_EQUALS = '=',
00063         HID_RIGHTANGLE = '>',
00064         HID_QUESTION = '?',
00065         HID_AT = '@',
00066 
00067         HID_A = 'A',
00068         HID_B = 'B',
00069         HID_C = 'C',
00070         HID_D = 'D',
00071         HID_E = 'E',
00072         HID_F = 'F',
00073         HID_G = 'G',
00074         HID_H = 'H',
00075         HID_I = 'I',
00076         HID_J = 'J',
00077         HID_K = 'K',
00078         HID_L = 'L',
00079         HID_M = 'M',
00080         HID_N = 'N',
00081         HID_O = 'O',
00082         HID_P = 'P',
00083         HID_Q = 'Q',
00084         HID_R = 'R',
00085         HID_S = 'S',
00086         HID_T = 'T',
00087         HID_U = 'U',
00088         HID_V = 'V',
00089         HID_W = 'W',
00090         HID_X = 'X',
00091         HID_Y = 'Y',
00092         HID_Z = 'Z',
00093 
00094         HID_LEFTBRACKET = '[',
00095         HID_BACKSLASH = '\\',
00096         HID_RIGHTBRACKET = ']',
00097         HID_CARET = '^',
00098         HID_UNDERSCORE = '_',
00099         HID_BACKQUOTE = '`',
00100 
00101         HID_LEFTBRACE = '{',
00102         HID_VERTICALBAR = '|',
00103         HID_RIGHTBRACE = '}',
00104         HID_TILDE = '~',
00105 
00106         /* Arrows + Home/End pad */
00107         HID_DELETE = 127,
00108         HID_INSERT,
00109         HID_END,
00110         HID_HOME,
00111         HID_PAGEDOWN,
00112         HID_PAGEUP,
00113         HID_UP,
00114         HID_DOWN,
00115         HID_LEFT,
00116         HID_RIGHT,
00117 
00118         /* Numeric keypad */
00119         HID_KP0,
00120         HID_KP1,
00121         HID_KP2,
00122         HID_KP3,
00123         HID_KP4,
00124         HID_KP5,
00125         HID_KP6,
00126         HID_KP7,
00127         HID_KP8,
00128         HID_KP9,
00129         HID_KP_PERIOD,
00130         HID_KP_SLASH,
00131         HID_KP_ASTERISK,
00132         HID_KP_MINUS,
00133         HID_KP_PLUS,
00134         HID_KP_ENTER,
00135         HID_KP_EQUALS,
00136 
00137         /* Function keys */
00138         HID_F1,
00139         HID_F2,
00140         HID_F3,
00141         HID_F4,
00142         HID_F5,
00143         HID_F6,
00144         HID_F7,
00145         HID_F8,
00146         HID_F9,
00147         HID_F10,
00148         HID_F11,
00149         HID_F12,
00150         HID_F13,
00151         HID_F14,
00152         HID_F15,
00153 
00154         /* Miscellaneous function keys */
00155         HID_PRINT,
00156         HID_NUM_LOCK,
00157         HID_CAPS_LOCK,
00158         HID_SCROLL_LOCK,
00159         HID_PAUSE,
00160         HID_ESCAPE,
00161 
00162         HID_LEFTSHIFT,
00163         HID_RIGHTSHIFT,
00164         HID_LEFTCONTROL,
00165         HID_RIGHTCONTROL,
00166         HID_LEFTALT,
00167         HID_RIGHTALT,
00168 
00169         /* Mouse Buttons */
00170         HID_MOUSE1,
00171         HID_MOUSE2,
00172         HID_MOUSE3,
00173         HID_MOUSE4,
00174         HID_MOUSE5,
00175         HID_MOUSE6,
00176         HID_MOUSE7,
00177         HID_MOUSE8,
00178         HID_MOUSE9,
00179         HID_MOUSE10,
00180         HID_MOUSE11,
00181         HID_MOUSE12,
00182         HID_MOUSE13,
00183         HID_MOUSE14,
00184         HID_MOUSE15,
00185         HID_MOUSE16,
00186 
00187         /* Joystick Buttons */
00188         HID_JOY1,
00189         HID_JOY2,
00190         HID_JOY3,
00191         HID_JOY4,
00192         HID_JOY5,
00193         HID_JOY6,
00194         HID_JOY7,
00195         HID_JOY8,
00196         HID_JOY9,
00197         HID_JOY10,
00198         HID_JOY11,
00199         HID_JOY12,
00200         HID_JOY13,
00201         HID_JOY14,
00202         HID_JOY15,
00203         HID_JOY16,
00204 
00205         HID_LAST
00206 };
00207 
00208 const char *HID_GetKeyName(HID_Key key);
00209 HID_Key HID_GetKeyFromName(Pentagram::istring & name);
00210 
00211 HID_Key HID_translateSDLKey(SDLKey key);
00212 HID_Key HID_translateSDLMouseButton(uint8 button);
00213 HID_Key HID_translateSDLJoystickButton(uint8 button);
00214 
00215 enum HID_Event {
00216         HID_EVENT_DEPRESS = 0,
00217         HID_EVENT_RELEASE,
00218         HID_EVENT_DOUBLE,
00219         HID_EVENT_CLICK,
00220         HID_EVENT_LAST
00221 };
00222 
00223 const char *HID_GetEventName(HID_Event event);
00224 HID_Event HID_GetEventFromName(Pentagram::istring & name);
00225 
00226 #endif

Generated on Fri Jul 27 22:27:18 2007 for pentagram by  doxygen 1.4.7