Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Feb 2021 12:58:18 +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-3QI22s1dWE@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 #25 from Koine Yuusuke <koinec@yahoo.co.jp> ---
(In reply to Michael Reifenberger from comment #24)

Thank you for reporting the results.

> Hi,do you have by chance updated patches for stable/12 and main?
>
> For me bhyve_kbdlayout_option_fbsd122r.patch doesn't seem to work as inte=
nded.
>
> Running a Windows 10 VM with '-k de' and setting the Windows KBD-Lang to =
'deu'
> seems to work for the intended Layout for Keys like '\|-_' but I don't get
> Umlauts or ???...

Currently, bhyve_kbdlayout_option_fbsd***.patch doesn't support
language-specific keys other than alphabets, numbers, ASCII code symbols(e.=
g.
!/#/$/etc), and control keys (Enter, Escape, Space, etc.) that are also fou=
nd
on US keyboards.
Because I only have a Japanese keyboard, I don't know what keys are on
keyboards in other languages, how to type them, and what keycodes are outpu=
t as
a result.
For this reason, you should not be able to enter umlauts, etc.

If possible, I would be grateful if you could add the settings specific to =
the
German keyboard to the "/usr/share/bhyve/kbdlayout/de" file.

This file has the following syntax.
----
'<ascii char>', hex (1byte); comment
hex (1or2byte), hex (1byte); comment
----
The first data is the state of the console that does not start Xorg, and if=
 the
character is displayed by pressing the key, enter the character separated by
quotes.
If the control key does not display characters, enter the value of keysym
displayed when the corresponding key is entered with the xev command in
hexadecimal.
However, since umlauts are one letter in German, not control keys, I'm sorr=
y I
don't know if they can be represented by Xorg's keysym.

For the second data, enter the scancode (type2) value of the keyboard of ea=
ch
language corresponding to that key.
The value of scancode differs depending on the keyboard of each language, so
please check it with google etc.
Then write a semicolon to mark the end of the line.
The line after the semicolon is considered a comment.

I'm sorry I think it's difficult, but if you understand it, please set it.


> Also the bhyve_qemu_ext_key_event_msg patch doesn't apply cleanly on top =
of the
> hyve_kbdlayout_option patch:
>
> Patching file bhyve/ps2kbd.c using Plan A...
> Hunk #1 succeeded at 185 (offset 7 lines).
> Hunk #2 failed at 339.
> Hunk #3 succeeded at 382 (offset 7 lines).
> Hunk #4 succeeded at 393 (offset 7 lines).
> 1 out of 4 hunks failed--saving rejects to bhyve/ps2kbd.c.rej

bhyve_kbdlayout_option_fbsd***.patch does not assume apply prior to
bhyve_qemu_ext_key_event_msg_fbsd***.patch.
For this reason, I'm sorry, but I would like you to apply
bhyve_qemu_ext_key_event_msg_fbsd***.patch first and then
bhyve_kbdlayout_option_fbsd***.patch to the original bhyve source code.


Finally, I launched the git site for this patch, and in addition to the pat=
ch,
I also released a tool to generate a layout file from a kbd file for FreeBS=
D's
vt, so please refer to it.
https://osdn.net/users/koinec/pf/bhyve_keyboard_layout_patch/wiki/FrontPage

Best regards.

--=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-3QI22s1dWE>