* [Qemu-devel] [PATCH] USB keyboard emulation key mapping error - debian#578846
@ 2010-10-18 12:55 Michael Tokarev
2011-01-16 18:56 ` Aurelien Jarno
0 siblings, 1 reply; 2+ messages in thread
From: Michael Tokarev @ 2010-10-18 12:55 UTC (permalink / raw)
To: qemu-devel
Brad Jorsch <anomie@users.sourceforge.net> writes ( http://bugs.debian.org/578846 ):
The USB keyboard emulation's translation table in hw/usb-hid.c doesn't
match the codes actually sent for the Logo (a.k.a. "Windows") or Menu
keys. This results in the guest OS not being able to receive these keys
at all when the USB keyboard emulation is being used.
In particular, both the keymap in /usr/share/kvm/keymaps/modifiers and
the evdev table in x_keymap.c map these keys to 0xdb, 0xdc, and 0xdd,
while usb_hid_usage_keys[] seems to be expecting them to be mapped to
0x7d, 0x7e, and 0x7f.
The attached patch seems to fix the problem, at least in my (limited)
testing.
This indeed fixes the problem, which is indeed exist.
http://bugs.debian.org/578846
http://bugs.debian.org/600593 (cloned from the above against different pkg)
https://bugs.launchpad.net/qemu/+bug/584139
Signed-Off-By: Brad Jorsch <anomie@users.sourceforge.net>
Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/usb-hid.c b/hw/usb-hid.c
--- a/hw/usb-hid.c
+++ b/hw/usb-hid.c
@@ -401,3 +401,3 @@ static const uint8_t usb_hid_usage_keys[0x100] = {
0x51, 0x4e, 0x49, 0x4c, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] USB keyboard emulation key mapping error - debian#578846
2010-10-18 12:55 [Qemu-devel] [PATCH] USB keyboard emulation key mapping error - debian#578846 Michael Tokarev
@ 2011-01-16 18:56 ` Aurelien Jarno
0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2011-01-16 18:56 UTC (permalink / raw)
To: Michael Tokarev; +Cc: qemu-devel
On Mon, Oct 18, 2010 at 04:55:25PM +0400, Michael Tokarev wrote:
> Brad Jorsch <anomie@users.sourceforge.net> writes ( http://bugs.debian.org/578846 ):
>
> The USB keyboard emulation's translation table in hw/usb-hid.c doesn't
> match the codes actually sent for the Logo (a.k.a. "Windows") or Menu
> keys. This results in the guest OS not being able to receive these keys
> at all when the USB keyboard emulation is being used.
>
> In particular, both the keymap in /usr/share/kvm/keymaps/modifiers and
> the evdev table in x_keymap.c map these keys to 0xdb, 0xdc, and 0xdd,
> while usb_hid_usage_keys[] seems to be expecting them to be mapped to
> 0x7d, 0x7e, and 0x7f.
>
> The attached patch seems to fix the problem, at least in my (limited)
> testing.
>
> This indeed fixes the problem, which is indeed exist.
>
> http://bugs.debian.org/578846
> http://bugs.debian.org/600593 (cloned from the above against different pkg)
> https://bugs.launchpad.net/qemu/+bug/584139
>
> Signed-Off-By: Brad Jorsch <anomie@users.sourceforge.net>
> Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>
>
> diff --git a/hw/usb-hid.c b/hw/usb-hid.c
> --- a/hw/usb-hid.c
> +++ b/hw/usb-hid.c
> @@ -401,3 +401,3 @@ static const uint8_t usb_hid_usage_keys[0x100] = {
> 0x51, 0x4e, 0x49, 0x4c, 0x00, 0x00, 0x00, 0x00,
> - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> + 0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65, 0x00, 0x00,
> 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>
>
Thanks, applied.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-16 18:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-18 12:55 [Qemu-devel] [PATCH] USB keyboard emulation key mapping error - debian#578846 Michael Tokarev
2011-01-16 18:56 ` Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).