1 2 /* 3 * Ascii values of command keys. 4 */ 5 #define KBD_TAB '\t' 6 #define KBD_DEL 127 7 #define KBD_RET '\r' 8 9 /* 10 * Define "hardware-independent" codes for the control, shift, meta and 11 * function keys. Codes start after the last 7-bit ASCII code (127) 12 * and are assigned in an arbitrary order. 13 */ 14 #define KBD_NOKEY 128 15 16 #define KBD_F1 201 17 #define KBD_F2 202 18 #define KBD_F3 203 19 #define KBD_F4 204 20 #define KBD_F5 205 21 #define KBD_F6 206 22 #define KBD_F7 207 23 #define KBD_F8 208 24 #define KBD_F9 209 25 #define KBD_F10 210 26 #define KBD_F11 211 27 #define KBD_F12 212 28 #define KBD_F13 213 29 #define KBD_F14 214 30 #define KBD_HELP 215 31 #define KBD_DO 216 32 #define KBD_F17 217 33 #define KBD_F18 218 34 #define KBD_F19 219 35 #define KBD_F20 220 36 37 #define KBD_FIND 221 38 #define KBD_INSERT 222 39 #define KBD_REMOVE 223 40 #define KBD_SELECT 224 41 #define KBD_PREVIOUS 225 42 #define KBD_NEXT 226 43 44 #define KBD_KP_ENTER 227 45 #define KBD_KP_F1 228 46 #define KBD_KP_F2 229 47 #define KBD_KP_F3 230 48 #define KBD_KP_F4 231 49 #define KBD_LEFT 232 50 #define KBD_RIGHT 233 51 #define KBD_DOWN 234 52 #define KBD_UP 235 53 54 #define KBD_CONTROL 236 55 #define KBD_SHIFT 237 56 #define KBD_CAPSLOCK 238 57 #define KBD_ALTERNATE 239 58 59 60 61 /* 62 * Definitions for the Keyboard and mouse. 63 */ 64 /* 65 * Special key values. 66 */ 67 #define KEY_R_SHIFT 0xab 68 #define KEY_SHIFT 0xae 69 #define KEY_CONTROL 0xaf 70 #define KEY_R_ALT 0xb2 71 #define KEY_UP 0xb3 72 #define KEY_REPEAT 0xb4 73 #define KEY_F1 0x56 74 #define KEY_COMMAND KEY_F1 75 76 /* 77 * Lk201/301 keyboard 78 */ 79 #define LK_UPDOWN 0x86 /* bits for setting lk201 modes */ 80 #define LK_AUTODOWN 0x82 81 #define LK_DOWN 0x80 82 #define LK_DEFAULTS 0xd3 /* reset mode settings */ 83 #define LK_AR_ENABLE 0xe3 /* global auto repeat enable */ 84 #define LK_CL_ENABLE 0x1b /* keyclick enable */ 85 #define LK_KBD_ENABLE 0x8b /* keyboard enable */ 86 #define LK_BELL_ENABLE 0x23 /* the bell */ 87 #define LK_LED_ENABLE 0x13 /* light led */ 88 #define LK_LED_DISABLE 0x11 /* turn off led */ 89 #define LK_RING_BELL 0xa7 /* ring keyboard bell */ 90 #define LED_1 0x81 /* led bits */ 91 #define LED_2 0x82 92 #define LED_3 0x84 93 #define LED_4 0x88 94 #define LED_ALL 0x8f 95 #define LK_HELP 0x7c /* help key */ 96 #define LK_DO 0x7d /* do key */ 97 #define LK_KDOWN_ERROR 0x3d /* key down on powerup error */ 98 #define LK_POWER_ERROR 0x3e /* keyboard failure on pwrup tst*/ 99 #define LK_OUTPUT_ERROR 0xb5 /* keystrokes lost during inhbt */ 100 #define LK_INPUT_ERROR 0xb6 /* garbage command to keyboard */ 101 #define LK_LOWEST 0x56 /* lowest significant keycode */ 102 103 /* max volume is 0, lowest is 0x7 */ 104 #define LK_PARAM_VOLUME(v) (0x80|((v)&0x7)) 105 106 /* mode command details */ 107 #define LK_CMD_MODE(m,div) ((m)|((div)<<3)) 108 109 110 /* 111 * Command characters for the mouse. 112 */ 113 #define MOUSE_SELF_TEST 'T' 114 #define MOUSE_INCREMENTAL 'R' 115 116 /* 117 * Mouse output bits. 118 * 119 * MOUSE_START_FRAME Start of report frame bit. 120 * MOUSE_X_SIGN Sign bit for X. 121 * MOUSE_Y_SIGN Sign bit for Y. 122 * MOUSE_X_OFFSET X offset to start cursor at. 123 * MOUSE_Y_OFFSET Y offset to start cursor at. 124 */ 125 #define MOUSE_START_FRAME 0x80 126 #define MOUSE_X_SIGN 0x10 127 #define MOUSE_Y_SIGN 0x08 128 129 /* 130 * Definitions for mouse buttons 131 */ 132 #define EVENT_LEFT_BUTTON 0x01 133 #define EVENT_MIDDLE_BUTTON 0x02 134 #define EVENT_RIGHT_BUTTON 0x03 135 #define RIGHT_BUTTON 0x01 136 #define MIDDLE_BUTTON 0x02 137 #define LEFT_BUTTON 0x04 138 139 #ifdef _KERNEL 140 extern int LKgetc __P((dev_t dev)); 141 extern void lkdivert __P (( int (*getc_fn) __P ((dev_t dev)), dev_t dev)); 142 #endif 143