xref: /titanic_44/usr/src/uts/i86pc/boot/boot_keyboard_table.h (revision 45405cce0657d01714b3d014a0facf3bdce45736)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef _BOOT_KEYBOARD_TABLE_H
27 #define	_BOOT_KEYBOARD_TABLE_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 /*
32  * Structure of the keyboard table for the bootstrap simple
33  * keyboard driver.
34  */
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 #define	KBTYPE_NORMAL	0x000	/* Normal keys, process mindlessly. */
41 #define	KBTYPE_ALPHA	0x100	/* Alpha.  If CapsLock is set, swap */
42 				/* shifted and unshifted meanings. */
43 				/* Set this on the unshifted character */
44 #define	KBTYPE_NUMPAD	0x200	/* Numeric/Arrow Pad.  If NumLock is set, */
45 				/* swap shifted and unshifted meanings. */
46 				/* Set this on the unshifted character. */
47 #define	KBTYPE_FUNC	0x300	/* Extended Function.  Send this code, */
48 				/* prefixed with zero. */
49 #define	KBTYPE_SPEC	0x400	/* One-of-a-kind codes.  Self-explanatory. */
50 #define	KBTYPE_SPEC_NOP			(KBTYPE_SPEC | 0x00)
51 #define	KBTYPE_SPEC_UNDEF		(KBTYPE_SPEC | 0x01)
52 #define	KBTYPE_SPEC_LSHIFT		(KBTYPE_SPEC | 0x02)
53 #define	KBTYPE_SPEC_RSHIFT		(KBTYPE_SPEC | 0x03)
54 #define	KBTYPE_SPEC_CTRL		(KBTYPE_SPEC | 0x04)
55 #define	KBTYPE_SPEC_ALT			(KBTYPE_SPEC | 0x05)
56 #define	KBTYPE_SPEC_CAPS_LOCK		(KBTYPE_SPEC | 0x06)
57 #define	KBTYPE_SPEC_NUM_LOCK		(KBTYPE_SPEC | 0x07)
58 #define	KBTYPE_SPEC_SCROLL_LOCK		(KBTYPE_SPEC | 0x08)
59 #define	KBTYPE_SPEC_MAYBE_REBOOT	(KBTYPE_SPEC | 0x09)
60 
61 struct keyboard_translate {
62 	unsigned short normal;
63 	unsigned short shifted;
64 	unsigned short ctrled;
65 	unsigned short alted;
66 };
67 
68 extern struct keyboard_translate keyboard_translate[128];
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif /* _BOOT_KEYBOARD_TABLE_H */
75