lk201.h Source File

Back to the index.

lk201.h
Go to the documentation of this file.
1 /* This file contains two files from netbsd, lk201.h and lk201.c. */
2 
3 #ifndef LK201_H
4 #define LK201_H
5 
6 /* $NetBSD: lk201.h,v 1.7 1999/03/19 18:34:01 ad Exp $ */
7 
8 
9 /*
10  * Ascii values of command keys.
11  */
12 #define KBD_TAB '\t'
13 #define KBD_DEL 127
14 #define KBD_RET '\r'
15 
16 /*
17  * Define "hardware-independent" codes for the control, shift, meta and
18  * function keys. Codes start after the last 7-bit ASCII code (127)
19  * and are assigned in an arbitrary order.
20  */
21 #define KBD_NOKEY 128
22 
23 #define KBD_F1 201
24 #define KBD_F2 202
25 #define KBD_F3 203
26 #define KBD_F4 204
27 #define KBD_F5 205
28 #define KBD_F6 206
29 #define KBD_F7 207
30 #define KBD_F8 208
31 #define KBD_F9 209
32 #define KBD_F10 210
33 #define KBD_F11 211
34 #define KBD_F12 212
35 #define KBD_F13 213
36 #define KBD_F14 214
37 #define KBD_HELP 215
38 #define KBD_DO 216
39 #define KBD_F17 217
40 #define KBD_F18 218
41 #define KBD_F19 219
42 #define KBD_F20 220
43 
44 #define KBD_FIND 221
45 #define KBD_INSERT 222
46 #define KBD_REMOVE 223
47 #define KBD_SELECT 224
48 #define KBD_PREVIOUS 225
49 #define KBD_NEXT 226
50 
51 #define KBD_KP_ENTER 227
52 #define KBD_KP_F1 228
53 #define KBD_KP_F2 229
54 #define KBD_KP_F3 230
55 #define KBD_KP_F4 231
56 #define KBD_LEFT 232
57 #define KBD_RIGHT 233
58 #define KBD_DOWN 234
59 #define KBD_UP 235
60 
61 #define KBD_CONTROL 236
62 #define KBD_SHIFT 237
63 #define KBD_CAPSLOCK 238
64 #define KBD_ALTERNATE 239
65 
66 
67 
68 /*
69  * Definitions for the Keyboard and mouse.
70  */
71 /*
72  * Special key values.
73  */
74 #define KEY_R_SHIFT 0xab
75 #define KEY_SHIFT 0xae
76 #define KEY_CONTROL 0xaf
77 #define KEY_CAPSLOCK 0xb0
78 #define KEY_R_ALT 0xb2
79 #define KEY_UP 0xb3
80 #define KEY_REPEAT 0xb4
81 #define KEY_F1 0x56
82 #define KEY_COMMAND KEY_F1
83 
84 /*
85  * Lk201/301 keyboard
86  */
87 #define LK_UPDOWN 0x86 /* bits for setting lk201 modes */
88 #define LK_AUTODOWN 0x82
89 #define LK_DOWN 0x80
90 #define LK_DEFAULTS 0xd3 /* reset mode settings */
91 #define LK_AR_ENABLE 0xe3 /* global auto repeat enable */
92 #define LK_CL_ENABLE 0x1b /* keyclick enable */
93 #define LK_KBD_ENABLE 0x8b /* keyboard enable */
94 #define LK_BELL_ENABLE 0x23 /* the bell */
95 #define LK_LED_ENABLE 0x13 /* light led */
96 #define LK_LED_DISABLE 0x11 /* turn off led */
97 #define LK_RING_BELL 0xa7 /* ring keyboard bell */
98 #define LED_1 0x81 /* led bits */
99 #define LED_2 0x82
100 #define LED_3 0x84
101 #define LED_4 0x88
102 #define LED_ALL 0x8f
103 #define LK_HELP 0x7c /* help key */
104 #define LK_DO 0x7d /* do key */
105 #define LK_KDOWN_ERROR 0x3d /* key down on powerup error */
106 #define LK_POWER_ERROR 0x3e /* keyboard failure on pwrup tst*/
107 #define LK_OUTPUT_ERROR 0xb5 /* keystrokes lost during inhbt */
108 #define LK_INPUT_ERROR 0xb6 /* garbage command to keyboard */
109 #define LK_LOWEST 0x56 /* lowest significant keycode */
110 
111 /* max volume is 0, lowest is 0x7 */
112 #define LK_PARAM_VOLUME(v) (0x80|((v)&0x7))
113 
114 /* mode command details */
115 #define LK_CMD_MODE(m,div) ((m)|((div)<<3))
116 
117 
118 /*
119  * Command characters for the mouse.
120  */
121 #define MOUSE_SELF_TEST 'T'
122 #define MOUSE_INCREMENTAL 'R'
123 
124 /*
125  * Mouse output bits.
126  *
127  * MOUSE_START_FRAME Start of report frame bit.
128  * MOUSE_X_SIGN Sign bit for X.
129  * MOUSE_Y_SIGN Sign bit for Y.
130  * MOUSE_X_OFFSET X offset to start cursor at.
131  * MOUSE_Y_OFFSET Y offset to start cursor at.
132  */
133 #define MOUSE_START_FRAME 0x80
134 #define MOUSE_X_SIGN 0x10
135 #define MOUSE_Y_SIGN 0x08
136 
137 /*
138  * Definitions for mouse buttons
139  */
140 #define EVENT_LEFT_BUTTON 0x01
141 #define EVENT_MIDDLE_BUTTON 0x02
142 #define EVENT_RIGHT_BUTTON 0x03
143 #define RIGHT_BUTTON 0x01
144 #define MIDDLE_BUTTON 0x02
145 #define LEFT_BUTTON 0x04
146 
147 #ifdef _KERNEL
148 extern int LKgetc __P((dev_t dev));
149 extern void lkdivert __P ((int (*getc_fn)(dev_t dev), dev_t dev));
150 #endif
151 
152 
153 /* This is also from netbsd, pmax/dev/lk201.c: */
154 
155 /*
156  * Keyboard to ASCII, unshifted.
157  */
158 static u_char unshiftedAscii[] = {
180 /* 54 */ KBD_NOKEY, KBD_NOKEY, KBD_F1, KBD_F2,
181 /* 58 */ KBD_F3, KBD_F4, KBD_F5, KBD_NOKEY,
184 /* 64 */ KBD_F6, KBD_F7, KBD_F8, KBD_F9,
187 /* 70 */ KBD_NOKEY, '\033', KBD_F12, KBD_F13,
190 /* 7c */ KBD_HELP, KBD_DO, KBD_NOKEY, KBD_NOKEY,
191 /* 80 */ KBD_F17, KBD_F18, KBD_F19, KBD_F20,
195 /* 90 */ KBD_NOKEY, KBD_NOKEY, '0', KBD_NOKEY,
196 /* 94 */ '.', KBD_KP_ENTER, '1', '2',
197 /* 98 */ '3', '4', '5', '6',
198 /* 9c */ ',', '7', '8', '9',
199 /* a0 */ '-', KBD_KP_F1, KBD_KP_F2, KBD_KP_F3,
201 /* a8 */ KBD_RIGHT, KBD_DOWN, KBD_UP, KBD_NOKEY,
206 /* bc */ KBD_DEL, KBD_RET, KBD_TAB, '`',
207 /* c0 */ '1', 'q', 'a', 'z',
208 /* c4 */ KBD_NOKEY, '2', 'w', 's',
209 /* c8 */ 'x', '<', KBD_NOKEY, '3',
210 /* cc */ 'e', 'd', 'c', KBD_NOKEY,
211 /* d0 */ '4', 'r', 'f', 'v',
212 /* d4 */ ' ', KBD_NOKEY, '5', 't',
213 /* d8 */ 'g', 'b', KBD_NOKEY, '6',
214 /* dc */ 'y', 'h', 'n', KBD_NOKEY,
215 /* e0 */ '7', 'u', 'j', 'm',
216 /* e4 */ KBD_NOKEY, '8', 'i', 'k',
217 /* e8 */ ',', KBD_NOKEY, '9', 'o',
218 /* ec */ 'l', '.', KBD_NOKEY, '0',
219 /* f0 */ 'p', KBD_NOKEY, ';', '/',
220 /* f4 */ KBD_NOKEY, '=', ']', '\\',
221 /* f8 */ KBD_NOKEY, '-', '[', '\'',
223 };
224 
225 /*
226  * Keyboard to Ascii, shifted.
227  */
228 static u_char shiftedAscii[] = {
250 /* 54 */ KBD_NOKEY, KBD_NOKEY, KBD_F1, KBD_F2,
251 /* 58 */ KBD_F3, KBD_F4, KBD_F5, KBD_NOKEY,
254 /* 64 */ KBD_F6, KBD_F7, KBD_F8, KBD_F9,
257 /* 70 */ KBD_NOKEY, KBD_F11, KBD_F12, KBD_F13,
260 /* 7c */ KBD_HELP, KBD_DO, KBD_NOKEY, KBD_NOKEY,
261 /* 80 */ KBD_F17, KBD_F18, KBD_F19, KBD_F20,
265 /* 90 */ KBD_NOKEY, KBD_NOKEY, '0', KBD_NOKEY,
266 /* 94 */ '.', KBD_KP_ENTER, '1', '2',
267 /* 98 */ '3', '4', '5', '6',
268 /* 9c */ ',', '7', '8', '9',
269 /* a0 */ '-', KBD_KP_F1, KBD_KP_F2, KBD_KP_F3,
271 /* a8 */ KBD_RIGHT, KBD_DOWN, KBD_UP, KBD_NOKEY,
276 /* bc */ KBD_DEL, KBD_RET, KBD_TAB, '~',
277 /* c0 */ '!', 'q', 'a', 'z',
278 /* c4 */ KBD_NOKEY, '@', 'w', 's',
279 /* c8 */ 'x', '>', KBD_NOKEY, '#',
280 /* cc */ 'e', 'd', 'c', KBD_NOKEY,
281 /* d0 */ '$', 'r', 'f', 'v',
282 /* d4 */ ' ', KBD_NOKEY, '%', 't',
283 /* d8 */ 'g', 'b', KBD_NOKEY, '^',
284 /* dc */ 'y', 'h', 'n', KBD_NOKEY,
285 /* e0 */ '&', 'u', 'j', 'm',
286 /* e4 */ KBD_NOKEY, '*', 'i', 'k',
287 /* e8 */ '<', KBD_NOKEY, '(', 'o',
288 /* ec */ 'l', '>', KBD_NOKEY, ')',
289 /* f0 */ 'p', KBD_NOKEY, ':', '?',
290 /* f4 */ KBD_NOKEY, '+', '}', '|',
291 /* f8 */ KBD_NOKEY, '_', '{', '"',
293 };
294 
295 #endif /* LK201_H */
#define KBD_KP_F3
Definition: lk201.h:54
#define KBD_NEXT
Definition: lk201.h:49
#define KBD_DO
Definition: lk201.h:38
#define KBD_F1
Definition: lk201.h:23
#define KBD_F9
Definition: lk201.h:31
#define KBD_F14
Definition: lk201.h:36
#define KBD_REMOVE
Definition: lk201.h:46
#define KBD_F8
Definition: lk201.h:30
#define KBD_KP_ENTER
Definition: lk201.h:51
#define KBD_DOWN
Definition: lk201.h:58
#define KBD_HELP
Definition: lk201.h:37
#define KBD_F19
Definition: lk201.h:41
#define KBD_DEL
Definition: lk201.h:13
#define KBD_SELECT
Definition: lk201.h:47
#define KBD_ALTERNATE
Definition: lk201.h:64
#define KBD_F18
Definition: lk201.h:40
#define KBD_INSERT
Definition: lk201.h:45
#define KBD_F10
Definition: lk201.h:32
#define KBD_F13
Definition: lk201.h:35
#define KBD_TAB
Definition: lk201.h:12
#define KBD_F11
Definition: lk201.h:33
#define KBD_CAPSLOCK
Definition: lk201.h:63
#define KBD_F4
Definition: lk201.h:26
#define KBD_F12
Definition: lk201.h:34
#define KBD_KP_F2
Definition: lk201.h:53
#define KBD_FIND
Definition: lk201.h:44
#define KBD_CONTROL
Definition: lk201.h:61
#define KBD_F7
Definition: lk201.h:29
#define KBD_KP_F1
Definition: lk201.h:52
#define __P(x)
Definition: dec_prom.h:6
#define KBD_F2
Definition: lk201.h:24
#define KBD_F6
Definition: lk201.h:28
#define KBD_PREVIOUS
Definition: lk201.h:48
#define KBD_KP_F4
Definition: lk201.h:55
#define KBD_NOKEY
Definition: lk201.h:21
#define KBD_F20
Definition: lk201.h:42
#define KBD_LEFT
Definition: lk201.h:56
#define KBD_UP
Definition: lk201.h:59
#define KBD_RET
Definition: lk201.h:14
#define KBD_F5
Definition: lk201.h:27
#define KBD_F3
Definition: lk201.h:25
#define KBD_RIGHT
Definition: lk201.h:57
#define KBD_F17
Definition: lk201.h:39
#define KBD_SHIFT
Definition: lk201.h:62

Generated on Sun Sep 30 2018 16:05:18 for GXemul by doxygen 1.8.13