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