qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] USB keyboard emulation key mapping error - debian#5


From: Michael Tokarev
Subject: [Qemu-devel] [PATCH] USB keyboard emulation key mapping error - debian#578846
Date: Mon, 18 Oct 2010 16:55:25 +0400
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.12) Gecko/20100913 Icedove/3.0.7

Brad Jorsch <address@hidden> 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 <address@hidden>
Signed-Off-By: Michael Tokarev <address@hidden>

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 via email to

[Prev in Thread] Current Thread [Next in Thread]