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