qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/5] input: keyboard cleanups continued.
@ 2014-03-18 14:41 Gerd Hoffmann
  2014-03-18 14:41 ` [Qemu-devel] [PATCH 1/5] input: key mapping helpers Gerd Hoffmann
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2014-03-18 14:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-03-18 14:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-18 14:41 [Qemu-devel] [PATCH 0/5] input: keyboard cleanups continued Gerd Hoffmann
2014-03-18 14:41 ` [Qemu-devel] [PATCH 1/5] input: key mapping helpers Gerd Hoffmann
2014-03-18 14:41 ` [Qemu-devel] [PATCH 2/5] input: add qemu_input_handler_deactivate Gerd Hoffmann
2014-03-18 14:41 ` [Qemu-devel] [PATCH 3/5] input: switch ps/2 kbd to new input api Gerd Hoffmann
2014-03-18 14:41 ` [Qemu-devel] [PATCH 4/5] input: switch ps/2 mouse " Gerd Hoffmann
2014-03-18 14:41 ` [Qemu-devel] [PATCH 5/5] [RfC] virtio-input Gerd Hoffmann

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).