xref: /netbsd/sys/dev/dec/lk201reg.h (revision 6550d01e)
1 /* $NetBSD: lk201reg.h,v 1.3 2005/12/11 12:21:20 christos Exp $ */
2 
3 /*
4  * command keycodes for Digital LK200/LK400 series keyboards.
5  */
6 
7 /*
8  * special keycodes
9  */
10 #define LK_POWER_UP	0x01
11 #define	LK_KEY_R_SHIFT	0xab
12 #define LK_KEY_SHIFT	0xae
13 #define LK_KEY_LOCK	0xb0
14 #define LK_KEY_CONTROL	0xaf
15 #define	LK_KEY_R_ALT	0xb2
16 #define LK_KEY_UP	0xb3
17 #define LK_KEY_REPEAT	0xb4
18 #define LK_KEY_HOLD	0x56	/* F1 */
19 #define LK_KDOWN_ERROR	0x3d		/* key down on powerup error	*/
20 #define LK_POWER_ERROR	0x3e		/* keyboard failure on pwrup tst*/
21 #define LK_OUTPUT_ERROR 0xb5		/* keystrokes lost during inhbt */
22 #define LK_INPUT_ERROR	0xb6		/* garbage command to keyboard	*/
23 #define LK_LOWEST	0x56		/* lowest significant keycode	*/
24 
25 /*
26  * keyboard commands
27  */
28 #define LK_UPDOWN	0x86		/* bits for setting lk201 modes */
29 #define LK_AUTODOWN	0x82
30 #define LK_DOWN		0x80
31 #define LK_DEFAULTS	0xd3		/* reset mode settings          */
32 #define LK_AR_ENABLE	0xe3		/* global auto repeat enable	*/
33 #define LK_CL_ENABLE	0x1b		/* keyclick enable		*/
34 #define LK_CL_DISABLE	0x99		/* keyclick disable		*/
35 #define LK_CCL_ENABLE	0xbb		/* enable keyclick for CTRL	*/
36 #define LK_CCL_DISABLE	0xb9		/* disable keyclick for CTRL	*/
37 #define LK_KBD_ENABLE	0x8b		/* keyboard enable		*/
38 #define LK_BELL_ENABLE	0x23		/* enable the bell		*/
39 #define LK_BELL_DISABLE	0xa1		/* disable the bell		*/
40 #define LK_LED_ENABLE	0x13		/* light led			*/
41 #define LK_LED_DISABLE	0x11		/* turn off led			*/
42 #define LK_RING_BELL	0xa7		/* ring keyboard bell		*/
43 #define LK_LED_1	0x81		/* led bits			*/
44 #define LK_LED_2	0x82
45 #define LK_LED_3	0x84
46 #define LK_LED_4	0x88
47 #define LK_LED_WAIT	0x81
48 #define LK_LED_COMP	0x82
49 #define LK_LED_LOCK	0x84
50 #define LK_LED_HOLD	0x88
51 #define LK_LED_ALL	0x8f
52 #define LK_HELP		0x7c		/* help key			*/
53 #define LK_DO		0x7d		/* do key			*/
54 #define LK_DIV6_START	0xad		/* start of div 6		*/
55 #define LK_DIV5_END	0xb2		/* end of div 5			*/
56 #define LK_ENABLE_401	0xe9		/* turn on LK401 mode		*/
57 #define LK_MODE_CHANGE	0xba		/* mode change ack		*/
58 
59 /* max volume is 0, lowest is 0x7 */
60 #define	LK_PARAM_VOLUME(v)		(0x80|((v)&0x7))
61 
62 /* mode command details */
63 #define	LK_CMD_MODE(m,div)		((m)|((div)<<3))
64