[Bug 246121] [bhyve][PATCH] Append Keyboard Layout specified option for using VNC.
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat May 2 12:09:04 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246121
Bug ID: 246121
Summary: [bhyve][PATCH] Append Keyboard Layout specified option
for using VNC.
Product: Base System
Version: Unspecified
Hardware: amd64
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bhyve
Assignee: virtualization at FreeBSD.org
Reporter: koinec at yahoo.co.jp
Attachment #214027 text/plain
mime type:
Created attachment 214027
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=214027&action=edit
[bhyve][PATCH] Append Keyboard Layout specified option for using VNC.
When a guest OS is loaded using UEFI and connected with VNC, if the keyboard on
the VNC client side is other than the US keyboard, some keys input may not be p
erformed correctly.
For example, if you press the '@' key on a Japanese keyboard, the number '2'
will be entered on the guest OS.
The cause is that the '@' key on the US keyboard is assigned to Shift + '2'
keys.
In addition, there is a problem that keys that do not exist on the US keyboard
cannot be entered.
(example, Zenkaku-Hankaku key in the Japanese Keyboard)
In the current bhyve(13-Current & 12.1-RELEASE-p3), in the virtual PS2 keyboard
driver, there is a conversion table that converts from the key entered from the
VNC client side to the virtual keyboard ScanCode for the Guest OS.
However, since this conversion table is set for US keyboards, the above problem
will occur if the client side is not a US keyboard.
Therefore, I created a patch that allows the conversion table to be set in the
external configuration file for each keyboard layout, and that the
configuration
file (=keyboard layout) can be specified by the option '-k' of the bhyve
command.
The following shows how to apply the patch and how to use it.
Please merge it into the source tree if possible.
I'm new to creating a patch for the FreeBSD source tree, and I'm not sure if
it's correct to submit to Bugzilla.
If it's wrong to submit it to Bugzilla, it would be very helpful if you could
tell me how to submit it.
A. How to apply the patch ----------------------------------
1. cd /usr/src/usr.sbin
2. patch -u < bhyve_kbdlayout_fbsd13c.patch
3. sh bhyve_kbdlayout.shar
4. cd /usr/src/usr.sbin/bhyve
5. make
6. make install
* If you use the FreeBSD 12.1-RELEASE, please replace the "fbsd13c" of the
above No.2 to the "fbsd121r".
B. How to specified the keyboard layout --------------------
If you use the bhyve command directly, specify the '-k layout' option for the
bhyve command.
You can specify the "layout" in the file name stored in
/usr/share/bhyve/kbdlayout dir.
If no '-k' option is specified, the US keyboard (default) is assumed to be
selected.
Others, If you use the bhyve via the vm-bhyve package, specify the following
lines for the Guest OS configure file.
bhyve_options="-k layout"
C. Request for Coooperation (The remaining tasks) ----------
Currently, the keyboard layout setting file can only be created for Japanese
keyboards.
(Because, I have only the Japanese Keyboard...)
If you would like to adopt this patch, I would like to ask those who use
keyboards of the corresponding languages to create keyboard layout setting
files oth
er than English and Japanese keyboards.
See the 'default' file in the /usr/share/bhyve/kbdlayout dir. for how to
create it.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-virtualization
mailing list