Skip to content

input: keyboard cleanups continued.

Gerd Hoffmann qemu-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5input: key mapping helpersinclude/ui/input.h ui/Makefile.objs ui/input-keymap.c +1 more+223 -1750 replies
2/5input: add qemu_input_handler_deactivateinclude/ui/input.h ui/input.c+8 -00 replies
3/5input: switch ps/2 kbd to new input apihw/input/ps2.c+24 -10 replies
4/5input: switch ps/2 mouse to new input apihw/input/ps2.c+52 -150 replies
5/5virtio-inputdocs/specs/virtio-input.txt hw/input/Makefile.objs hw/input/virtio-input.c +4 more+791 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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
Signature · 1 line
1.8.3.1