xref: /titanic_41/usr/src/uts/i86pc/boot/boot_keyboard_table.c (revision ae115bc77f6fcde83175c75b4206dc2e50747966)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
27 
28 /*
29  * Keyboard table for bootstrap's simple keyboard driver.
30  */
31 
32 #include "boot_keyboard_table.h"
33 
34 #define	A	| KBTYPE_ALPHA
35 #define	C	& 0x1f
36 #define	F	| KBTYPE_FUNC
37 #define	N	| KBTYPE_NUMPAD
38 
39 #define	ALT	KBTYPE_SPEC_ALT
40 #define	CTRL	KBTYPE_SPEC_CTRL
41 #define	LSHIFT	KBTYPE_SPEC_LSHIFT
42 #define	NOP	KBTYPE_SPEC_NOP
43 #define	NUMLK	KBTYPE_SPEC_NUM_LOCK
44 #define	SCRLLK	KBTYPE_SPEC_SCROLL_LOCK
45 #define	CAPSLK	KBTYPE_SPEC_CAPS_LOCK
46 #define	RSHIFT	KBTYPE_SPEC_RSHIFT
47 #define	REBOOT	KBTYPE_SPEC_MAYBE_REBOOT
48 #define	UNDEF	KBTYPE_SPEC_UNDEF
49 
50 struct keyboard_translate keyboard_translate[128] = {
51 	/*		Normal	Shifted	Ctrled	Alted */
52 	/* 00 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
53 	/* 01 */	'['C,	'['C,	NOP,	NOP,
54 	/* 02 */	'1',	'!',	NOP,	0x78 F,
55 	/* 03 */	'2',	'@',	NOP,	0x79 F,
56 	/* 04 */	'3',	'#',	NOP,	0x7a F,
57 	/* 05 */	'4',	'$',	NOP,	0x7b F,
58 	/* 06 */	'5',	'%',	NOP,	0x7c F,
59 	/* 07 */	'6',	'^',	'^'C,	0x7d F,
60 	/* 08 */	'7',	'&',	NOP,	0x7e F,
61 	/* 09 */	'8',	'*',	NOP,	0x7f F,
62 	/* 0a */	'9',	'(',	NOP,	0x80 F,
63 	/* 0b */	'0',	')',	NOP,	0x81 F,
64 	/* 0c */	'-',	'_',	NOP,	0x82 F,
65 	/* 0d */	'=',	'+',	NOP,	0x83 F,
66 	/* 0e */	'h'C,	0x0e F,	0x7f,	NOP,
67 	/* 0f */	'i'C,	0x0f F,	NOP,	NOP,
68 	/* 10 */	'q'A,	'Q',	'q'C,	0x10 F,
69 	/* 11 */	'w'A,	'W',	'w'C,	0x11 F,
70 	/* 12 */	'e'A,	'E',	'e'C,	0x12 F,
71 	/* 13 */	'r'A,	'R',	'r'C,	0x13 F,
72 	/* 14 */	't'A,	'T',	't'C,	0x14 F,
73 	/* 15 */	'y'A,	'Y',	'y'C,	0x15 F,
74 	/* 16 */	'u'A,	'U',	'u'C,	0x16 F,
75 	/* 17 */	'i'A,	'I',	'i'C,	0x17 F,
76 	/* 18 */	'o'A,	'O',	'o'C,	0x18 F,
77 	/* 19 */	'p'A,	'P',	'p'C,	0x19 F,
78 	/* 1a */	'[',	'{',	'['C,	NOP,
79 	/* 1b */	']',	'}',	']'C,	NOP,
80 	/* 1c */	'm'C,	'm'C,	NOP,	NOP,
81 	/* 1d */	CTRL,	CTRL,	CTRL,	CTRL,
82 	/* 1e */	'a'A,	'A',	'a'C,	0x1e F,
83 	/* 1f */	's'A,	'S',	's'C,	0x1f F,
84 	/* 20 */	'd'A,	'D',	'd'C,	0x20 F,
85 	/* 21 */	'f'A,	'F',	'f'C,	0x21 F,
86 	/* 22 */	'g'A,	'G',	'g'C,	0x22 F,
87 	/* 23 */	'h'A,	'H',	'h'C,	0x23 F,
88 	/* 24 */	'j'A,	'J',	'j'C,	0x24 F,
89 	/* 25 */	'k'A,	'K',	'k'C,	0x25 F,
90 	/* 26 */	'l'A,	'L',	'l'C,	0x26 F,
91 	/* 27 */	';',	':',	NOP,	NOP,
92 	/* 28 */	'\'',	'"',	NOP,	NOP,
93 	/* 29 */	'`',	'~',	NOP,	NOP,
94 	/* 2a */	LSHIFT,	LSHIFT,	LSHIFT,	LSHIFT,
95 	/* 2b */	'\\',	'|',	'\\'C,	NOP,
96 	/* 2c */	'z'A,	'Z',	'z'C,	0x2c F,
97 	/* 2d */	'x'A,	'X',	'x'C,	0x2d F,
98 	/* 2e */	'c'A,	'C',	'c'C,	0x2e F,
99 	/* 2f */	'v'A,	'V',	'v'C,	0x2f F,
100 	/* 30 */	'b'A,	'B',	'b'C,	0x30 F,
101 	/* 31 */	'n'A,	'N',	'n'C,	0x31 F,
102 	/* 32 */	'm'A,	'M',	'm'C,	0x32 F,
103 	/* 33 */	',',	'<',	NOP,	NOP,
104 	/* 34 */	'.',	'>',	NOP,	NOP,
105 	/* 35 */	'/',	'?',	NOP,	NOP,
106 	/* 36 */	RSHIFT,	RSHIFT,	RSHIFT,	RSHIFT,
107 	/* 37 */	'*',	NOP,	NOP,	NOP,	/* * PrtSc */
108 	/* 38 */	ALT,	ALT,	ALT,	ALT,
109 	/* 39 */	' ',	' ',	NOP,	NOP,
110 	/* 3a */	CAPSLK,	CAPSLK,	CAPSLK,	CAPSLK,
111 	/* 3b */	0x3b F,	0x54 F,	0x5e F,	0x68 F,
112 	/* 3c */	0x3c F,	0x55 F,	0x5f F,	0x69 F,
113 	/* 3d */	0x3d F,	0x56 F,	0x60 F,	0x6a F,
114 	/* 3e */	0x3e F,	0x57 F,	0x61 F,	0x6b F,
115 	/* 3f */	0x3f F,	0x58 F,	0x62 F,	0x6c F,
116 	/* 40 */	0x40 F,	0x59 F,	0x63 F,	0x6d F,
117 	/* 41 */	0x41 F,	0x5a F,	0x64 F,	0x6e F,
118 	/* 42 */	0x42 F,	0x5b F,	0x65 F,	0x6f F,
119 	/* 43 */	0x43 F,	0x5c F,	0x66 F,	0x70 F,
120 	/* 44 */	0x44 F,	0x5d F,	0x67 F,	0x71 F,
121 	/* 45 */	NUMLK,	NUMLK,	NUMLK,	NUMLK,
122 	/* 46 */	SCRLLK,	SCRLLK,	SCRLLK,	SCRLLK,
123 	/* 47 */	0x47 N,	'7',	NOP,	NOP,
124 	/* 48 */	0x48 N,	'8',	NOP,	NOP,
125 	/* 49 */	0x49 N,	'9',	NOP,	NOP,
126 	/* 4a */	'-',	'-',	NOP,	NOP,
127 	/* 4b */	0x4b N,	'4',	NOP,	NOP,
128 	/* 4c */	NOP,	'5',	NOP,	NOP,
129 	/* 4d */	0x4d N,	'6',	NOP,	NOP,
130 	/* 4e */	'+',	'+',	NOP,	NOP,
131 	/* 4f */	0x4f N,	'1',	NOP,	NOP,
132 	/* 50 */	0x50 N,	'2',	NOP,	NOP,
133 	/* 51 */	0x51 N,	'3',	NOP,	NOP,
134 	/* 52 */	0x52 N,	'0',	NOP,	NOP,
135 	/* 53 */	0x53 N,	'.',	REBOOT,	REBOOT,
136 	/* 54 */	NOP,	NOP,	NOP,	NOP,	/* SysReq */
137 	/* 55 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
138 	/* 56 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
139 	/* 57 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
140 	/* 58 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
141 	/* 59 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
142 	/* 5a */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
143 	/* 5b */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
144 	/* 5c */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
145 	/* 5d */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
146 	/* 5e */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
147 	/* 5f */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
148 	/* 60 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
149 	/* 61 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
150 	/* 62 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
151 	/* 63 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
152 	/* 64 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
153 	/* 65 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
154 	/* 66 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
155 	/* 67 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
156 	/* 68 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
157 	/* 69 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
158 	/* 6a */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
159 	/* 6b */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
160 	/* 6c */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
161 	/* 6d */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
162 	/* 6e */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
163 	/* 6f */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
164 	/* 70 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
165 	/* 71 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
166 	/* 72 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
167 	/* 73 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
168 	/* 74 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
169 	/* 75 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
170 	/* 76 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
171 	/* 77 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
172 	/* 78 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
173 	/* 79 */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
174 	/* 7a */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
175 	/* 7b */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
176 	/* 7c */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
177 	/* 7d */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
178 	/* 7e */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
179 	/* 7f */	UNDEF,	UNDEF,	UNDEF,	UNDEF,
180 };
181