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