From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36192 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PeXmG-00070C-Kn for qemu-devel@nongnu.org; Sun, 16 Jan 2011 13:56:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PeXmE-0005og-Oy for qemu-devel@nongnu.org; Sun, 16 Jan 2011 13:56:36 -0500 Received: from hall.aurel32.net ([88.191.126.93]:33445) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PeXmE-0005oT-JB for qemu-devel@nongnu.org; Sun, 16 Jan 2011 13:56:34 -0500 Date: Sun, 16 Jan 2011 19:56:33 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] USB keyboard emulation key mapping error - debian#578846 Message-ID: <20110116185633.GO16663@hall.aurel32.net> References: <4CBC43BD.1080406@msgid.tls.msk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <4CBC43BD.1080406@msgid.tls.msk.ru> Sender: Aurelien Jarno List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: qemu-devel On Mon, Oct 18, 2010 at 04:55:25PM +0400, Michael Tokarev wrote: > Brad Jorsch 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 > Signed-Off-By: Michael Tokarev > > 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