All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>
Subject: [Qemu-devel] [PATCH 00/15] Convert over to use keycodemapdb
Date: Thu, 10 Aug 2017 16:55:07 +0100	[thread overview]
Message-ID: <20170810155522.31099-1-berrange@redhat.com> (raw)

The keycodemap project[1] provides a database mapping between
many different keysym/keycode/scancode sets, along with a
tool to generate mapping/lookup tables in various programming
languages. It is already used by GTK-VNC, SPICE-GTK and
libvirt.

This series enables its use in QEMU, thus fixing a great
many bugs/ommissions in the 15+ key mapping tables people
have manually written for QEMU.

The keycodemapdb code is designed to be used as a git
sub-module, it is not an external dependancy you need
installed before use.

This series converts all the front ends and all the input
devices which are using the new InputEvent framework. A
handful of devices still use the legacy kbd handler

  $ git grep -l add_kbd_event_handler hw
  hw/arm/musicpal.c
  hw/arm/nseries.c
  hw/arm/palm.c
  hw/arm/spitz.c
  hw/input/pxa2xx_keypad.c
  hw/input/stellaris_input.c

and could be usefully converted too.

I've not done much realworld testing of this yet. I did
however write code that compared the mapping tables before
and after conversion to identify what mapping changes have
resulted in each frontend/backend.  What I still need to
go back and validate is the Print/Sysrq handling, because
that is special everywhere and I'm not entirely sure I've
done that correctly yet. The GTK frontend should now work
correctly when run on X11 servers on Win32 and OS-X, as
well as when run on native Win32/OS-X display backends.

[1] https://gitlab.com/keycodemap/keycodemapdb/

Daniel P. Berrange (15):
  ui: add keycodemapdb repository as a GIT submodule
  ui: convert common input code to keycodemapdb
  ui: convert key events to QKeyCodes immediately
  ui: don't export qemu_input_event_new_key
  ui: use QKeyCode exclusively in InputKeyEvent
  input: convert virtio-input-hid device to keycodemapdb
  input: convert ps2 device to keycodemapdb
  input: convert the adb device to keycodemapdb
  char: convert the escc device to keycodemapdb
  ui: convert cocoa frontend to keycodemapdb
  ui: convert the SDL2 frontend to keycodemapdb
  ui: convert GTK and SDL1 frontends to keycodemapdb
  ui: remove qemu_input_qcode_to_number method
  ui: remove qemu_input_linux_to_qcode method
  display: convert XenInput keyboard to keycodemapdb

 .gitignore                  |   2 +
 .gitmodules                 |   3 +
 hw/char/escc.c              | 128 +-------------
 hw/display/xenfb.c          | 131 +++-----------
 hw/input/adb.c              | 126 +-------------
 hw/input/hid.c              |   6 +-
 hw/input/ps2.c              | 408 +-------------------------------------------
 hw/input/virtio-input-hid.c | 138 ++-------------
 include/hw/input/adb-keys.h | 141 ---------------
 include/ui/input.h          |  64 ++++++-
 qapi-schema.json            |   2 +-
 replay/replay-input.c       |  36 +---
 ui/Makefile.objs            |  41 ++++-
 ui/cocoa.m                  | 129 +-------------
 ui/gtk.c                    | 205 +++++++++++++---------
 ui/input-keymap.c           | 369 ++++-----------------------------------
 ui/input-legacy.c           |  31 ++--
 ui/input-linux.c            |   4 +-
 ui/input.c                  |  49 ++----
 ui/keycodemapdb             |   1 +
 ui/sdl.c                    | 103 ++++-------
 ui/sdl2-input.c             |  14 +-
 ui/sdl2-keymap.h            | 267 -----------------------------
 ui/trace-events             |  10 +-
 ui/x_keymap.c               | 247 ++++++++++-----------------
 ui/x_keymap.h               |   8 +-
 26 files changed, 495 insertions(+), 2168 deletions(-)
 delete mode 100644 include/hw/input/adb-keys.h
 create mode 160000 ui/keycodemapdb
 delete mode 100644 ui/sdl2-keymap.h

-- 
2.13.3

             reply	other threads:[~2017-08-10 15:55 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 15:55 Daniel P. Berrange [this message]
2017-08-10 15:55 ` [Qemu-devel] [PATCH 01/15] ui: add keycodemapdb repository as a GIT submodule Daniel P. Berrange
2017-08-10 18:23   ` Eric Blake
2017-08-11  9:07     ` Daniel P. Berrange
2017-08-10 15:55 ` [Qemu-devel] [PATCH 02/15] ui: convert common input code to keycodemapdb Daniel P. Berrange
2017-08-10 18:59   ` Eric Blake
2017-08-11  9:12     ` Daniel P. Berrange
2017-08-10 15:55 ` [Qemu-devel] [PATCH 03/15] ui: convert key events to QKeyCodes immediately Daniel P. Berrange
2017-08-10 19:11   ` Eric Blake
2017-08-10 15:55 ` [Qemu-devel] [PATCH 04/15] ui: don't export qemu_input_event_new_key Daniel P. Berrange
2017-08-10 15:55 ` [Qemu-devel] [PATCH 05/15] ui: use QKeyCode exclusively in InputKeyEvent Daniel P. Berrange
2017-08-10 19:02   ` Eric Blake
2017-08-11  9:13     ` Daniel P. Berrange
2017-08-10 15:55 ` [Qemu-devel] [PATCH 06/15] input: convert virtio-input-hid device to keycodemapdb Daniel P. Berrange
2017-08-21 13:49   ` Gerd Hoffmann
2017-08-30 16:01     ` Daniel P. Berrange
2017-09-01  7:10       ` Gerd Hoffmann
2017-08-10 15:55 ` [Qemu-devel] [PATCH 07/15] input: convert ps2 " Daniel P. Berrange
2017-08-10 15:55 ` [Qemu-devel] [PATCH 08/15] input: convert the adb " Daniel P. Berrange
2017-08-10 15:55 ` [Qemu-devel] [PATCH 09/15] char: convert the escc " Daniel P. Berrange
2017-08-10 15:55 ` [Qemu-devel] [PATCH 10/15] ui: convert cocoa frontend " Daniel P. Berrange
2017-08-10 15:55 ` [Qemu-devel] [PATCH 11/15] ui: convert the SDL2 " Daniel P. Berrange
2017-08-10 15:55 ` [Qemu-devel] [PATCH 12/15] ui: convert GTK and SDL1 frontends " Daniel P. Berrange
2017-08-10 15:55 ` [Qemu-devel] [PATCH 13/15] ui: remove qemu_input_qcode_to_number method Daniel P. Berrange
2017-08-10 15:55 ` [Qemu-devel] [PATCH 14/15] ui: remove qemu_input_linux_to_qcode method Daniel P. Berrange
2017-08-10 15:55 ` [Qemu-devel] [PATCH 15/15] display: convert XenInput keyboard to keycodemapdb Daniel P. Berrange
2017-08-10 16:10 ` [Qemu-devel] [PATCH 00/15] Convert over to use keycodemapdb no-reply
2017-08-10 16:59   ` Daniel P. Berrange
2017-08-10 16:11 ` no-reply
2017-08-10 16:11 ` no-reply
2017-08-10 16:12 ` no-reply
2017-08-21 13:53 ` Gerd Hoffmann
     [not found] <mailman.1016.1502380547.21956.qemu-devel@nongnu.org>
2017-08-12 19:41 ` Programmingkid

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=20170810155522.31099-1-berrange@redhat.com \
    --to=berrange@redhat.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.