From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 0/5] input: keyboard cleanups continued.
Date: Tue, 18 Mar 2014 15:41:22 +0100 [thread overview]
Message-ID: <1395153687-11030-1-git-send-email-kraxel@redhat.com> (raw)
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
next reply other threads:[~2014-03-18 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 14:41 Gerd Hoffmann [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1395153687-11030-1-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).