qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC PATCH 0/5] ui: add keyboard state and hotkey tracker


From: Gerd Hoffmann
Subject: [Qemu-devel] [RFC PATCH 0/5] ui: add keyboard state and hotkey tracker
Date: Wed, 21 Feb 2018 18:08:15 +0100

Ok, here is my alternative approach to hotkey configuration.

Downside: It does *not* allow to freely choose any keys for hotkeys.
Hotkeys are restricted to be one normal key combined with up to three
modifiers (no modifiers is fine too).

Upside:  The code is simpler.  We don't have to keep back events because
they might be part of a hotkey.  The code also supports multiple
hotkeys.

While being at it have the code also track all key state, so user
interfaces don't have to do that on their own any more.

The sdl2 ui is used to show this in action.  No command line option
parsing added yet, so hotkeys are not actually configurable for now.
The groundwork to change them at runtime is there though.

Gerd Hoffmann (5):
  kbd-state: add keyboard state tracker
  kbd-state: add hotkey registry
  kbd-state: use state tracker for sdl2
  kbd-state: register sdl2 hotkeys
  sdl2: use only QKeyCode in sdl2_process_key()

 include/ui/kbd-state.h |  49 ++++++++++++++++
 include/ui/sdl2.h      |   2 +
 ui/kbd-state.c         | 152 +++++++++++++++++++++++++++++++++++++++++++++++++
 ui/sdl2-input.c        |  54 ++----------------
 ui/sdl2.c              | 114 ++++++++++++++++++++-----------------
 ui/Makefile.objs       |   2 +-
 6 files changed, 270 insertions(+), 103 deletions(-)
 create mode 100644 include/ui/kbd-state.h
 create mode 100644 ui/kbd-state.c

-- 
2.9.3




reply via email to

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