xref: /illumos-gate/usr/src/data/bhyve/kbdlayout/default (revision d7b72f7b52f902da47cc7210a9121f4caabbcb9c)
1# bhyve ps2kbd keyboard layout file (US - default)
2#
3# Created by: Koine Yuusuke(koinec) <koinec@users.osdn.me>
4#
5# $FreeBSD$
6
7# for those who create the Keyboard Layout File. ******************************
8#  To create the keyboard layout file, first copy this 'default' file into the
9#  same dir. with the layout name as the file name.
10#  The file name is a character string that can be specified as it is in the
11#  -k option of the bhyve command, so a normal language name is desirable.
12#  Then, it is necessary to define the difference between the standard US keyboard
13#  and the keyboard for each language according to the setting method described
14#  in the comment below.
15#
16#  Note that lines starting with '#' and blank lines are ignored.
17#  In addition, the definition of the standard layout setting (US keyboard)
18#  is described as a comment line below for reference.
19#  So you usually only need to remove the '#' and fix it to the correct ScanCode
20#  only on the lines of the key that you can't type correctly with the standard
21#  US keyboard settings.
22
23
24# Alphabet/Number/Sign Keys ---------------------------------------------------
25#   Format:
26#     'Chr',ScanCode(Hex); <Comment>
27#       or
28#     AsciiCode(Hex),ScanCode(Hex); <Comment>
29#
30#  If there are ASCII characters that cannot be entered correctly with the
31#  standard settings(US Keyboard layout), delete the "#" at the beginning of the
32#  relevant line below and set the correct ScanCode.
33#
34#  For example, when a Japanese Keyboard is used, the '@' sign cannot be input
35#  correctly and the number '2' is input.
36#  This is because the US keyboard can input the '@' sign with the Shift + number'2'
37#  keys, and the ScanCode of the '@' sign is the number '2' key by default.
38#  In this case, remove the '#' at the beginning of the line with the '@' sign
39#  below and correct the ScanCode from 0x1e to 0x54 so that you can enter it
40#  correctly.
41#  ScanCode differs depending on the keyboard of eash language, so check it on
42#  the Internet.
43#  Note that keys that have no problems with input have the same settings as
44#  the US keyboard, so you do not need to set anything below.
45#  See the "/usr/share/bhyve/kbdlayout/jp106" file for the specific setting method.
46
47# '!',0x16;	!  (0x21)
48# '"',0x52;	"  (0x22)
49# '#',0x26;	#  (0x23)
50# '$',0x25;	$  (0x24)
51# '%',0x2e;	%  (0x25)
52# '&',0x3d;	&  (0x26)
53# ''',0x52;	'  (0x27)
54# '(',0x46;	(  (0x28)
55# ')',0x45;	)  (0x29)
56# '*',0x3e;	*  (0x2a)
57# '+',0x55;	+  (0x2b)
58# ',',0x41;	,  (0x2c)
59# '-',0x4e;	-  (0x2d)
60# '.',0x49;	.  (0x2e)
61# '/',0x4a;	/  (0x2f)
62
63# '0',0x45;	0  (0x30)
64# '1',0x16;	1  (0x31)
65# '2',0x1e;	2  (0x32)
66# '3',0x26;	3  (0x33)
67# '4',0x25;	4  (0x34)
68# '5',0x2e;	5  (0x35)
69# '6',0x36;	6  (0x36)
70# '7',0x3d;	7  (0x37)
71# '8',0x3e;	8  (0x38)
72# '9',0x46;	9  (0x39)
73# ':',0x4c;	:  (0x3a)
74# ';',0x4c;	;  (0x3b)
75# '<',0x41;	<  (0x3c)
76# '=',0x55;	=  (0x3d)
77# '>',0x49;	>  (0x3e)
78# '?',0x4a;	?  (0x3f)
79
80# '@',0x1e;	@  (0x40)
81# 'A',0x1c;	A  (0x41)
82# 'B',0x32;	B  (0x42)
83# 'C',0x21;	C  (0x43)
84# 'D',0x23;	D  (0x44)
85# 'E',0x24;	E  (0x45)
86# 'F',0x2b;	F  (0x46)
87# 'G',0x34;	G  (0x47)
88# 'H',0x33;	H  (0x48)
89# 'I',0x43;	I  (0x49)
90# 'J',0x3b;	J  (0x4a)
91# 'K',0x42;	K  (0x4b)
92# 'L',0x4b;	L  (0x4c)
93# 'M',0x3a;	M  (0x4d)
94# 'N',0x31;	N  (0x4e)
95# 'O',0x44;	O  (0x4f)
96
97# 'P',0x4d;	P  (0x50)
98# 'Q',0x15;	Q  (0x51)
99# 'R',0x2d;	R  (0x52)
100# 'S',0x1b;	S  (0x53)
101# 'T',0x2c;	T  (0x54)
102# 'U',0x3c;	U  (0x55)
103# 'V',0x2a;	V  (0x56)
104# 'W',0x1d;	W  (0x57)
105# 'X',0x22;	X  (0x58)
106# 'Y',0x35;	Y  (0x59)
107# 'Z',0x1a;	Z  (0x5a)
108# '[',0x54;	[  (0x5b)
109# '\',0x5d;	\  (0x5c)
110# ']',0x5b;	]  (0x5d)
111# '^',0x36;	^  (0x5e)
112# '_',0x4e;	_  (0x5f)
113
114# '`',0x0e;	`  (0x60)
115# 'a',0x1c;	a  (0x61)
116# 'b',0x32;	b  (0x62)
117# 'c',0x21;	c  (0x63)
118# 'd',0x23;	d  (0x64)
119# 'e',0x24;	e  (0x65)
120# 'f',0x2b;	f  (0x66)
121# 'g',0x34;	g  (0x67)
122# 'h',0x33;	h  (0x68)
123# 'i',0x43;	i  (0x69)
124# 'j',0x3b;	j  (0x6a)
125# 'k',0x42;	k  (0x6b)
126# 'l',0x4b;	l  (0x6c)
127# 'm',0x3a;	m  (0x6d)
128# 'n',0x31;	n  (0x6e)
129# 'o',0x44;	o  (0x6f)
130
131# 'p',0x4d;	p  (0x70)
132# 'q',0x15;	q  (0x71)
133# 'r',0x2d;	r  (0x72)
134# 's',0x1b;	s  (0x73)
135# 't',0x2c;	t  (0x74)
136# 'u',0x3c;	u  (0x75)
137# 'v',0x2a;	v  (0x76)
138# 'w',0x1d;	w  (0x77)
139# 'x',0x22;	x  (0x78)
140# 'y',0x35;	y  (0x79)
141# 'z',0x1a;	z  (0x7a)
142# '{',0x54;	{  (0x7b)
143# '|',0x5d;	|  (0x7c)
144# '}',0x5b;	}  (0x7d)
145# '~',0x0e;	~  (0x7e)
146
147
148# Functional Keys -------------------------------------------------------------
149#   Format:
150#     Xorg KeySym(Hex:2Byte),ScanCode(Hex); <Comment>
151#       or
152#     Xorg KeySym(Hex:2Byte),ScanCode(Hex),Prefix(Hex); <Comment>
153#
154#  Key definitions other than alphanumeric characters such as Enter and Escape
155#  are set in this section.
156#  If there is a key that can not be entered correctly with the standard settings
157#  (US Keyboard layout),, delete the '#' at the beginning of the corresponding
158#  line and set the correct scan code.
159#  The Xorg KeySym Code can be checked by using the 'xev' command from X window
160#  on the guest OS.
161#  In addition, some keys have ScanCodes that have a Prefix Byte.
162#  In this case, define '0xe0' as the third argument.(example Home Key,etc)
163#  Note that keys that have no problems with input have the same settings as
164#  the US keyboard, so you do not need to set anything below.
165#  See the "/usr/share/bhyve/kbdlayout/jp106" file for the specific setting method.
166
167# 0xff08,0x66;		Back space
168# 0xff09,0x0d;		Tab
169# 0xff0d,0x5a;		Return
170# 0xff1b,0x76;		Escape
171# 0xff50,0x6c,0xe0; 	Home
172# 0xff51,0x6b,0xe0; 	Left arrow
173# 0xff52,0x75,0xe0; 	Up arrow
174# 0xff53,0x74,0xe0; 	Right arrow
175# 0xff54,0x72,0xe0; 	Down arrow
176# 0xff55,0x7d,0xe0; 	PgUp
177# 0xff56,0x7a,0xe0; 	PgDown
178# 0xff57,0x69,0xe0; 	End
179# 0xff63,0x70,0xe0; 	Ins
180# 0xff8d,0x5a,0xe0; 	Keypad Enter
181# 0xffe1,0x12;		Left shift
182# 0xffe2,0x59;		Right shift
183# 0xffe3,0x14;		Left control
184# 0xffe4,0x14,0xe0; 	Right control
185# 0xffe9,0x11;		Left alt
186# 0xfe03,0x11,0xe0; 	AltGr
187# 0xffea,0x11,0xe0; 	Right alt
188# 0xffeb,0x1f,0xe0; 	Left Windows
189# 0xffec,0x27,0xe0; 	Right Windows
190# 0xffbe,0x05;		F1
191# 0xffbf,0x06;		F2
192# 0xffc0,0x04;		F3
193# 0xffc1,0x0c;		F4
194# 0xffc2,0x03;		F5
195# 0xffc3,0x0b;		F6
196# 0xffc4,0x83;		F7
197# 0xffc5,0x0a;		F8
198# 0xffc6,0x01;		F9
199# 0xffc7,0x09;		F10
200# 0xffc8,0x78;		F11
201# 0xffc9,0x07;		F12
202# 0xffff,0x71,0xe0;	Del
203# 0xff14,0x7e;		ScrollLock
204
205
206# NumLock and Keypads ---------------------------------------------------------
207#
208#  The numeric keypad settings are the same as the Functional Key section above.
209
210# 0xff7f,0x77; 		NumLock
211# 0xffaf,0x4a,0xe0; 	Keypad slash
212# 0xffaa,0x7c; 		Keypad asterisk
213# 0xffad,0x7b; 		Keypad minus
214# 0xffab,0x79;	 	Keypad plus
215# 0xffb7,0x6c; 		Keypad 7
216# 0xff95,0x6c; 		Keypad home
217# 0xffb8,0x75; 		Keypad 8
218# 0xff97,0x75; 		Keypad up arrow
219# 0xffb9,0x7d; 		Keypad 9
220# 0xff9a,0x7d; 		Keypad PgUp
221# 0xffb4,0x6b; 		Keypad 4
222# 0xff96,0x6b; 		Keypad left arrow
223# 0xffb5,0x73; 		Keypad 5
224# 0xff9d,0x73; 		Keypad empty
225# 0xffb6,0x74; 		Keypad 6
226# 0xff98,0x74; 		Keypad right arrow
227# 0xffb1,0x69; 		Keypad 1
228# 0xff9c,0x69; 		Keypad end
229# 0xffb2,0x72; 		Keypad 2
230# 0xff99,0x72; 		Keypad down arrow
231# 0xffb3,0x7a; 		Keypad 3
232# 0xff9b,0x7a; 		Keypad PgDown
233# 0xffb0,0x70; 		Keypad 0
234# 0xff9e,0x70; 		Keypad ins
235# 0xffae,0x71; 		Keypad .
236# 0xff9f,0x71; 		Keypad del
237
238
239# Language Specific Keys -------------------------------------------------------
240#
241#  If a key not exist in the US keyboard is added to the keyboard of each language,
242#  it is necessary to add the combination of Xorg KeySym and ScanCode of the
243#  corresponding key.
244#  The setting format is the same as the Functional Key section above.
245#   example:
246#     0xff2a,0x0e;   Hankaku/Zenkaku|Kanji (Japanese 106 keyboard original Key)
247
248
249