xref: /original-bsd/sys/sparc/dev/kbd.h (revision 8bb6539f)
1 /*
2  * Copyright (c) 1992 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * This software was developed by the Computer Systems Engineering group
6  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
7  * contributed to Berkeley.
8  *
9  * %sccs.include.redist.c%
10  *
11  *	@(#)kbd.h	7.1 (Berkeley) 07/13/92
12  *
13  * from: $Header: kbd.h,v 1.4 92/06/17 05:35:48 torek Exp $ (LBL)
14  */
15 
16 /*
17  * Keyboard `registers'.  (This should be called kbd_reg.h but we need to
18  * be compatible.)
19  */
20 
21 /*
22  * Control codes sent from type 2, 3, and 4 keyboards.
23  *
24  * Note that KBD_RESET is followed by a keyboard ID, while KBD_IDLE is not.
25  * KBD_IDLE does not take the place of any `up' transitions (it merely occurs
26  * after them).
27  */
28 #define	KBD_RESET	0xff		/* keyboard `reset' response */
29 #define	KBD_IDLE	0x7f		/* keyboard `all keys are up' code */
30 
31 /* Keyboard IDs */
32 #define	KB_SUN2		2		/* type 2 keyboard */
33 #define	KB_SUN3		3		/* type 3 keyboard */
34 #define	KB_SUN4		4		/* type 4 keyboard */
35 
36 /* Key codes are in 0x00..0x7e; KBD_UP is set if the key goes up */
37 #define	KBD_KEYMASK	0x7f		/* keyboard key mask */
38 #define	KBD_UP		0x80		/* keyboard `up' transition */
39 
40 /* Keyboard codes needed to recognize the L1-A sequence */
41 #define	KBD_L1		1		/* keyboard code for `L1' key */
42 #define	KBD_A		77		/* keyboard code for `A' key */
43 
44 /* Control codes sent to the various keyboards */
45 #define	KBD_CMD_RESET	1		/* reset keyboard */
46 #define	KBD_CMD_BELL	2		/* turn bell on */
47 #define	KBD_CMD_NOBELL	3		/* turn bell off */
48 #define	KBD_CMD_CLICK	10		/* turn keyclick on */
49 #define	KBD_CMD_NOCLICK	11		/* turn keyclick off */
50