qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 0/5] ui: add keyboard state and hotkey tracker
@ 2018-02-21 17:08 Gerd Hoffmann
  2018-02-21 17:08 ` [Qemu-devel] [RFC PATCH 1/5] kbd-state: add keyboard state tracker Gerd Hoffmann
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2018-02-21 17:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: programmingkidx, berrange, peter.maydell, Gerd Hoffmann

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

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

end of thread, other threads:[~2018-06-05 14:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-21 17:08 [Qemu-devel] [RFC PATCH 0/5] ui: add keyboard state and hotkey tracker Gerd Hoffmann
2018-02-21 17:08 ` [Qemu-devel] [RFC PATCH 1/5] kbd-state: add keyboard state tracker Gerd Hoffmann
2018-02-21 17:08 ` [Qemu-devel] [RFC PATCH 2/5] kbd-state: add hotkey registry Gerd Hoffmann
2018-06-01 19:05   ` Programmingkid
2018-06-05 10:20     ` Gerd Hoffmann
2018-06-05 14:37       ` Programmingkid
2018-02-21 17:08 ` [Qemu-devel] [RFC PATCH 3/5] kbd-state: use state tracker for sdl2 Gerd Hoffmann
2018-02-21 17:08 ` [Qemu-devel] [RFC PATCH 4/5] kbd-state: register sdl2 hotkeys Gerd Hoffmann
2018-02-21 17:08 ` [Qemu-devel] [RFC PATCH 5/5] sdl2: use only QKeyCode in sdl2_process_key() Gerd Hoffmann
2018-02-22 14:14 ` [Qemu-devel] [RFC PATCH 0/5] ui: add keyboard state and hotkey tracker no-reply

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