diff options
author | Michael Tokarev <mjt@tls.msk.ru> | 2010-10-18 16:55:25 +0400 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2011-01-16 19:52:48 +0100 |
commit | a8fb7ff3fdd05ffb4cce1ab4d3ff7768a490f2f5 (patch) | |
tree | ee0408af5b49f55d12cdbf8963e8c69419cc35b4 /hw/usb-hid.c | |
parent | b2d9eda5d473fa7251319a368b0ee72d75218aed (diff) |
USB keyboard emulation key mapping error
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.
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>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/usb-hid.c')
-rw-r--r-- | hw/usb-hid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb-hid.c b/hw/usb-hid.c index 882d933466..e8de301a13 100644 --- a/hw/usb-hid.c +++ b/hw/usb-hid.c @@ -399,7 +399,7 @@ static const uint8_t usb_hid_usage_keys[0x100] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x4a, 0x52, 0x4b, 0x00, 0x50, 0x00, 0x4f, 0x00, 0x4d, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |