include/df/input.hpp

00001 //these are ORed with KEY_... keys when they are hit
00002 #define INPUT_SHIFT    0x100
00003 #define INPUT_CTRL     0x200
00004 #define INPUT_ALT      0x400
00005 #define INPUT_SPECIAL 0x1000  //this is a special KEY (see below)
00006 #define INPUT_MASK    0x0f00  //INPUT_... (should not include INPUT_SPECIAL)
00007 #define INPUT_USER    0x8000  //DF doesn't use this flag (you as you like)
00008 
00009 #define KEY_MASK      0x10ff
00010 
00011 // MSG_KEYDOWN/UP uses KEY_... codes
00012 // MSG_GETKEY uses ASCII codes
00013 
00014 // A few KEY_... codes are the same as the ASCII codes
00015 //   these include A-Z,0-9,KEY_ENTER,KEY_SPACE,KEY_BACK,KEY_TAB,KEY_ESC
00016 
00017 #define KEY_BACK           0x08
00018  #define KEY_BS KEY_BACK
00019 #define KEY_TAB            0x09
00020 
00021 #define KEY_RETURN         0x0A
00022  #define KEY_ENTER KEY_RETURN
00023 #define KEY_CLEAR          0x0C
00024 //DF/2.1.5 - 0x0d - no longer defined as ENTER - use 0x0a
00025 
00026 #define KEY_ESCAPE         0x1B
00027  #define KEY_ESC KEY_ESCAPE
00028 
00029 #define KEY_SPACE          0x20   // ' '
00030 
00031 #define KEY_SQR_OPEN       0x5B   // [ {
00032 #define KEY_BACKSLASH      0x5C   // \ |
00033 #define KEY_SQR_CLOSE      0x5D   // ] }
00034 #define KEY_QUOTE          0x27   // ' "
00035 #define KEY_TILDE          0x7E   // ` ~
00036 #define KEY_MINUS          0x2D   // - _
00037 #define KEY_EQUAL          0x3D   // = +
00038 #define KEY_COLON          0x3A   // : ;
00039 
00040 #define KEY_COMMA          0x2C   // , <
00041 #define KEY_PERIOD         0x2E   // . >
00042 #define KEY_DIVIDE         0x2F   // / ?
00043 
00044 /* KEY_0 thru KEY_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
00045 /* KEY_A thru KEY_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
00046 
00047 //the rest of the codes are special keys (non-typeable)
00048 //  there would be no MSG_GETKEY generated (although they can alter what
00049 //  MSG_GETKEY returns)
00050 
00051 #define KEY_SHIFT          0x1060
00052 #define KEY_CTRL           0x1061
00053 #define KEY_ALT            0x1062
00054 #define KEY_PAUSE          0x1063
00055 #define KEY_CAPSLOCK       0x1064
00056 
00057 #define KEY_PAGE_UP        0x1065
00058 #define KEY_PAGE_DOWN      0x1066
00059 #define KEY_END            0x1067
00060 #define KEY_HOME           0x1068
00061 #define KEY_LEFT           0x1069
00062 #define KEY_UP             0x106a
00063 #define KEY_RIGHT          0x106b
00064 #define KEY_DOWN           0x106c
00065 
00066 #define KEY_INSERT         0x106d
00067 #define KEY_DELETE         0x106e
00068 
00069 #define KEY_LWIN           0x1070
00070 #define KEY_RWIN           0x1071
00071 #define KEY_APPS           0x1072
00072 
00073 //0x7E is reserved (~)
00074 
00075 #define KEY_NUMPAD_0       0x1080
00076 #define KEY_NUMPAD_1       0x1081
00077 #define KEY_NUMPAD_2       0x1082
00078 #define KEY_NUMPAD_3       0x1083
00079 #define KEY_NUMPAD_4       0x1084
00080 #define KEY_NUMPAD_5       0x1085
00081 #define KEY_NUMPAD_6       0x1086
00082 #define KEY_NUMPAD_7       0x1087
00083 #define KEY_NUMPAD_8       0x1088
00084 #define KEY_NUMPAD_9       0x1089
00085 
00086 #define KEY_NUMPAD_MULTIPLY       0x108A
00087 #define KEY_NUMPAD_ADD            0x108B
00088 #define KEY_NUMPAD_SUBTRACT       0x108C
00089 #define KEY_NUMPAD_DIVIDE         0x108D
00090 #define KEY_NUMPAD_DECIMAL        0x108E
00091 
00092 #define KEY_F1             0x1090
00093 #define KEY_F2             0x1091
00094 #define KEY_F3             0x1092
00095 #define KEY_F4             0x1093
00096 #define KEY_F5             0x1094
00097 #define KEY_F6             0x1095
00098 #define KEY_F7             0x1096
00099 #define KEY_F8             0x1097
00100 #define KEY_F9             0x1098
00101 #define KEY_F10            0x1099
00102 #define KEY_F11            0x109A
00103 #define KEY_F12            0x109B
00104 
00105 #define KEY_NUMLOCK        0x10A0
00106 #define KEY_SCROLLLOCK     0x10A1
00107 
00108 

Generated on Mon Mar 5 09:49:14 2007 for DigiForce by  doxygen 1.4.7