1 /* $NetBSD: lk201.h,v 1.6 1999/03/10 13:02:43 kleink 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_KBD_ENABLE 0x8b /* keyboard enable */ 88 #define LK_BELL_ENABLE 0x23 /* the bell */ 89 #define LK_LED_ENABLE 0x13 /* light led */ 90 #define LK_LED_DISABLE 0x11 /* turn off led */ 91 #define LK_RING_BELL 0xa7 /* ring keyboard bell */ 92 #define LED_1 0x81 /* led bits */ 93 #define LED_2 0x82 94 #define LED_3 0x84 95 #define LED_4 0x88 96 #define LED_ALL 0x8f 97 #define LK_HELP 0x7c /* help key */ 98 #define LK_DO 0x7d /* do key */ 99 #define LK_KDOWN_ERROR 0x3d /* key down on powerup error */ 100 #define LK_POWER_ERROR 0x3e /* keyboard failure on pwrup tst*/ 101 #define LK_OUTPUT_ERROR 0xb5 /* keystrokes lost during inhbt */ 102 #define LK_INPUT_ERROR 0xb6 /* garbage command to keyboard */ 103 #define LK_LOWEST 0x56 /* lowest significant keycode */ 104 105 /* max volume is 0, lowest is 0x7 */ 106 #define LK_PARAM_VOLUME(v) (0x80|((v)&0x7)) 107 108 /* mode command details */ 109 #define LK_CMD_MODE(m,div) ((m)|((div)<<3)) 110 111 112 /* 113 * Command characters for the mouse. 114 */ 115 #define MOUSE_SELF_TEST 'T' 116 #define MOUSE_INCREMENTAL 'R' 117 118 /* 119 * Mouse output bits. 120 * 121 * MOUSE_START_FRAME Start of report frame bit. 122 * MOUSE_X_SIGN Sign bit for X. 123 * MOUSE_Y_SIGN Sign bit for Y. 124 * MOUSE_X_OFFSET X offset to start cursor at. 125 * MOUSE_Y_OFFSET Y offset to start cursor at. 126 */ 127 #define MOUSE_START_FRAME 0x80 128 #define MOUSE_X_SIGN 0x10 129 #define MOUSE_Y_SIGN 0x08 130 131 /* 132 * Definitions for mouse buttons 133 */ 134 #define EVENT_LEFT_BUTTON 0x01 135 #define EVENT_MIDDLE_BUTTON 0x02 136 #define EVENT_RIGHT_BUTTON 0x03 137 #define RIGHT_BUTTON 0x01 138 #define MIDDLE_BUTTON 0x02 139 #define LEFT_BUTTON 0x04 140 141 #ifdef _KERNEL 142 extern int LKgetc __P((dev_t dev)); 143 extern void lkdivert __P ((int (*getc_fn)(dev_t dev), dev_t dev)); 144 #endif 145