qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 0/5] input: keyboard cleanups continued.


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH 0/5] input: keyboard cleanups continued.
Date: Tue, 18 Mar 2014 15:41:22 +0100

  Hi,

Little patch series to continue input cleanups, for the most part
keyboard related.

First patch adds helper functions to translate InputKeyEvents into other
representations used in qemu today, to simplify switching over keyboard
emulation backends to the new input API.  With the new API things should
be easier because the need to handle SCANCODE_EMUL0 & SCANCODE_UP in the
backends goes away.

Third patch converts the ps/2 keyboard to the new API.  Isn't that a
great example as the emulation actually must pass scancodes to the
guest so there isn't much of a simplification.

A much better example is patch #5 which implements a virtio keyboard
(also mouse & tablet).

I've also tried to convert the hid code (used by usb-kbd).  Nasty
thing there is that it stores scancodes (the values it gets from
old qemu input api, i.e. qemu implementation details) instead of
hid keycodes (the values it passes to the guest) in the event
queue.  The event queue is vmstate data.  Which makes the switch
to the new API a bit difficuilt :(

cheers,
  Gerd

Gerd Hoffmann (5):
  input: key mapping helpers
  input: add qemu_input_handler_deactivate
  input: switch ps/2 kbd to new input api
  input: switch ps/2 mouse to new input api
  [RfC] virtio-input

 docs/specs/virtio-input.txt      |  50 ++++
 hw/input/Makefile.objs           |   4 +
 hw/input/ps2.c                   |  92 +++++--
 hw/input/virtio-input.c          | 559 +++++++++++++++++++++++++++++++++++++++
 hw/virtio/virtio-pci.c           |  88 ++++++
 hw/virtio/virtio-pci.h           |  18 ++
 include/hw/pci/pci.h             |   1 +
 include/hw/virtio/virtio-input.h |  71 +++++
 include/ui/input.h               |   5 +
 ui/Makefile.objs                 |   3 +-
 ui/input-keymap.c                | 210 +++++++++++++++
 ui/input-legacy.c                | 181 +------------
 ui/input.c                       |   7 +
 13 files changed, 1098 insertions(+), 191 deletions(-)
 create mode 100644 docs/specs/virtio-input.txt
 create mode 100644 hw/input/virtio-input.c
 create mode 100644 include/hw/virtio/virtio-input.h
 create mode 100644 ui/input-keymap.c

-- 
1.8.3.1




reply via email to

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