https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246121

--- Comment #2 from Koine Yuusuke <koi...@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 ASCII
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 Escape
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 characters
or key names (key names is unique to vt/syscons, not Xorg keysym) corresponding
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 ScanCode
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 cannot
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 expressed
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)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"

Reply via email to