Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 May 2020 11:51:05 +0000
From:      bugzilla-noreply@freebsd.org
To:        virtualization@FreeBSD.org
Subject:   [Bug 246121] [bhyve][PATCH] Append Keyboard Layout specified option for using VNC.
Message-ID:  <bug-246121-27103-dLJpQMAlm3@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-246121-27103@https.bugs.freebsd.org/bugzilla/>
References:  <bug-246121-27103@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D246121

--- Comment #2 from Koine Yuusuke <koinec@yahoo.co.jp> ---
Thank you for you interest in the patch.

Unfortunately, I understand that the your suggestions are difficult for the
following reasons.

The virtual PS2 keyboard driver of the bhyve has a table for converting ASC=
II
code for keys that can be expressed in ASCII characters and Xorg keysym code
for keys that cannot be expressed in ASCII characters (example Enter or Esc=
ape
key,etc) to ScanCode Set2 of the PS2 keyboard.
This patch updates this conversion table based on the layout setting file.

The /usr/share/vt/keymaps/* file contain the correspondence of ASCII charac=
ters
or key names (key names is unique to vt/syscons, not Xorg keysym) correspon=
ding
to the scancode (for vt/syscons) converted from ScanCode Set2 of the PS2
keyboard device.
In addition, I confirmed that the conversion algorithm from ScanCode Set2 of
the PS2 keyboard to scancode (for vt/syscons) is implemented in
/usr/src/sys/dev/atkbdc/atkbd.c, so I think that it is not impossible to use
the /usr/share/vt/keymaps/* file as the basis for the keys that can be
represented by ASCII characters.
(Since it has not been examined in detail, I don't understand whether ScanC=
ode
Set2 of the PS2 keyboard can actually be converted from scancode (for
vt/syscons) to the reverse.)

On the other hand, a key that cannot be represented by ASCII characters can=
not
be supported because the value of Xorg keysym value doesn't exist in
/usr/share/vt/keymaps/* file.
 (For reference, the value of Xorg keysym value is in the
/usr/local/include/X11/keysymdef.h)

Therefore, even if the key layout conversion information that can be expres=
sed
in ASCII characters is acquired from /usr/share/vt/keymaps/* file, the key =
that
cannot be expressed in ASCII characters cannot be acquired from
/usr/share/vt/keymaps/* file, and thus I think that a layout configuration =
file
for each language is required.

If you have a good idea to use /usr/share/vt/keymaps/* file, please let me
know.
 (I also don't want to have a layout configuration file for bhyve apart from
/usr/share/vt/keymaps/* file.
  But I did this because I couldn't think of any other simple way...)

 - Koine Yuusuke (koinec)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-246121-27103-dLJpQMAlm3>