qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] USB keyboard emulation key mapping error - debian#578846
Date: Sun, 16 Jan 2011 19:56:33 +0100	[thread overview]
Message-ID: <20110116185633.GO16663@hall.aurel32.net> (raw)
In-Reply-To: <4CBC43BD.1080406@msgid.tls.msk.ru>

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

      reply	other threads:[~2011-01-16 18:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110116185633.GO16663@hall.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).