1 /* $NetBSD: lk201.h,v 1.7.42.1 2005/02/04 11:45:23 skrll Exp $ */
5 * Ascii values of command keys.
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.
40 #define KBD_INSERT 222
41 #define KBD_REMOVE 223
42 #define KBD_SELECT 224
43 #define KBD_PREVIOUS 225
46 #define KBD_KP_ENTER 227
56 #define KBD_CONTROL 236
58 #define KBD_CAPSLOCK 238
59 #define KBD_ALTERNATE 239
64 * Definitions for the Keyboard and mouse.
69 #define KEY_R_SHIFT 0xab
70 #define KEY_SHIFT 0xae
71 #define KEY_CONTROL 0xaf
72 #define KEY_CAPSLOCK 0xb0
73 #define KEY_R_ALT 0xb2
75 #define KEY_REPEAT 0xb4
77 #define KEY_COMMAND KEY_F1
82 #define LK_UPDOWN 0x86 /* bits for setting lk201 modes */
83 #define LK_AUTODOWN 0x82
85 #define LK_DEFAULTS 0xd3 /* reset mode settings */
86 #define LK_AR_ENABLE 0xe3 /* global auto repeat enable */
87 #define LK_CL_ENABLE 0x1b /* keyclick enable */
88 #define LK_KBD_ENABLE 0x8b /* keyboard enable */
89 #define LK_BELL_ENABLE 0x23 /* the bell */
90 #define LK_LED_ENABLE 0x13 /* light led */
91 #define LK_LED_DISABLE 0x11 /* turn off led */
92 #define LK_RING_BELL 0xa7 /* ring keyboard bell */
93 #define LED_1 0x81 /* led bits */
98 #define LK_HELP 0x7c /* help key */
99 #define LK_DO 0x7d /* do key */
100 #define LK_KDOWN_ERROR 0x3d /* key down on powerup error */
101 #define LK_POWER_ERROR 0x3e /* keyboard failure on pwrup tst*/
102 #define LK_OUTPUT_ERROR 0xb5 /* keystrokes lost during inhbt */
103 #define LK_INPUT_ERROR 0xb6 /* garbage command to keyboard */
104 #define LK_LOWEST 0x56 /* lowest significant keycode */
106 /* max volume is 0, lowest is 0x7 */
107 #define LK_PARAM_VOLUME(v) (0x80|((v)&0x7))
109 /* mode command details */
110 #define LK_CMD_MODE(m,div) ((m)|((div)<<3))
114 * Command characters for the mouse.
116 #define MOUSE_SELF_TEST 'T'
117 #define MOUSE_INCREMENTAL 'R'
122 * MOUSE_START_FRAME Start of report frame bit.
123 * MOUSE_X_SIGN Sign bit for X.
124 * MOUSE_Y_SIGN Sign bit for Y.
125 * MOUSE_X_OFFSET X offset to start cursor at.
126 * MOUSE_Y_OFFSET Y offset to start cursor at.
128 #define MOUSE_START_FRAME 0x80
129 #define MOUSE_X_SIGN 0x10
130 #define MOUSE_Y_SIGN 0x08
133 * Definitions for mouse buttons
135 #define EVENT_LEFT_BUTTON 0x01
136 #define EVENT_MIDDLE_BUTTON 0x02
137 #define EVENT_RIGHT_BUTTON 0x03
138 #define RIGHT_BUTTON 0x01
139 #define MIDDLE_BUTTON 0x02
140 #define LEFT_BUTTON 0x04
143 extern int LKgetc(dev_t dev
);
144 extern void lkdivert(int (*getc_fn
)(dev_t dev
), dev_t dev
);