summary refs log tree commit diff stats
path: root/hw/input/virtio-input-hid.c
diff options
context:
space:
mode:
authorLadi Prosek <lprosek@redhat.com>2016-03-30 15:07:20 +0200
committerGerd Hoffmann <kraxel@redhat.com>2016-04-13 15:52:28 +0200
commit27a7bbcdf9483be3b4c0b816d59676c8715c2af3 (patch)
tree7ff308317e84129f56781a9143b0bf3309524c93 /hw/input/virtio-input-hid.c
parent441330f7146c5b5422e52729188d1d62e2f47862 (diff)
downloadfocaccia-qemu-27a7bbcdf9483be3b4c0b816d59676c8715c2af3.tar.gz
focaccia-qemu-27a7bbcdf9483be3b4c0b816d59676c8715c2af3.zip
virtio-input: add missing key mappings
KEY_PAUSE is flat out missing. KEY_SYSRQ already has a keycode
assigned but it's not what I'm seeing on my system. The mapping
doesn't appear to have to be unique so both keycodes now map to
KEY_SYSRQ which is what the "Keyboard PrintScreen", HID usage ID
0x46, translates to.

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Message-id: 1459343240-19483-1-git-send-email-lprosek@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/input/virtio-input-hid.c')
-rw-r--r--hw/input/virtio-input-hid.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c
index 5d12157114..fe6d37fd73 100644
--- a/hw/input/virtio-input-hid.c
+++ b/hw/input/virtio-input-hid.c
@@ -121,6 +121,8 @@ static const unsigned int keymap_qcode[Q_KEY_CODE__MAX] = {
 
     [Q_KEY_CODE_CTRL_R]              = KEY_RIGHTCTRL,
     [Q_KEY_CODE_SYSRQ]               = KEY_SYSRQ,
+    [Q_KEY_CODE_PRINT]               = KEY_SYSRQ,
+    [Q_KEY_CODE_PAUSE]               = KEY_PAUSE,
     [Q_KEY_CODE_ALT_R]               = KEY_RIGHTALT,
 
     [Q_KEY_CODE_HOME]                = KEY_HOME,