qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] USB keyboard emulation key mapping error - debian#578846
Date: Mon, 18 Oct 2010 16:55:25 +0400	[thread overview]
Message-ID: <4CBC43BD.1080406@msgid.tls.msk.ru> (raw)

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,

             reply	other threads:[~2010-10-18 12:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-18 12:55 Michael Tokarev [this message]
2011-01-16 18:56 ` [Qemu-devel] [PATCH] USB keyboard emulation key mapping error - debian#578846 Aurelien Jarno

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=4CBC43BD.1080406@msgid.tls.msk.ru \
    --to=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).