From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH v3 1/8] kbd-state: add keyboard state tracker
Date: Tue, 22 Jan 2019 09:47:20 +0000 [thread overview]
Message-ID: <20190122094720.GC13143@redhat.com> (raw)
In-Reply-To: <20190122092814.14919-2-kraxel@redhat.com>
On Tue, Jan 22, 2019 at 10:28:07AM +0100, Gerd Hoffmann wrote:
> Now that most user interfaces are using QKeyCodes it is easier to have
> common keyboard code useable by all user interfaces.
>
> This patch adds helper code to track the state of all keyboard keys,
> using a bitmap indexed by QKeyCode. Modifier state is tracked too,
> as separate bitmap. That makes checking modifier state easier.
> Likewise we can easily apply special handling for capslock & numlock
> (toggles on keypress) and ctrl + shift (we have two keys for that).
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> include/ui/kbd-state.h | 96 +++++++++++++++++++++++++++++++++++++
> ui/kbd-state.c | 125 +++++++++++++++++++++++++++++++++++++++++++++++++
> ui/Makefile.objs | 2 +-
> 3 files changed, 222 insertions(+), 1 deletion(-)
> create mode 100644 include/ui/kbd-state.h
> create mode 100644 ui/kbd-state.c
>
> diff --git a/include/ui/kbd-state.h b/include/ui/kbd-state.h
> new file mode 100644
> index 0000000000..277198f169
> --- /dev/null
> +++ b/include/ui/kbd-state.h
> @@ -0,0 +1,96 @@
Missing license boilerplate header, and same in the .c file.
> +#ifndef QEMU_UI_KBD_STATE_H
> +#define QEMU_UI_KBD_STATE_H 1
With license header added
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2019-01-22 9:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 9:28 [Qemu-devel] [RFC PATCH v3 0/8] ui: add generic keyboard state tracker, fix keymap Gerd Hoffmann
2019-01-22 9:28 ` [Qemu-devel] [RFC PATCH v3 1/8] kbd-state: add keyboard state tracker Gerd Hoffmann
2019-01-22 9:47 ` Daniel P. Berrangé [this message]
2019-01-22 9:28 ` [Qemu-devel] [RFC PATCH v3 2/8] sdl2: remove sdl2_reset_keys() function Gerd Hoffmann
2019-01-22 9:28 ` [Qemu-devel] [RFC PATCH v3 3/8] kbd-state: use state tracker for sdl2 Gerd Hoffmann
2019-01-22 9:28 ` [Qemu-devel] [RFC PATCH v3 4/8] sdl2: use only QKeyCode in sdl2_process_key() Gerd Hoffmann
2019-01-22 9:28 ` [Qemu-devel] [RFC PATCH v3 5/8] kbd-state: use state tracker for gtk Gerd Hoffmann
2019-01-22 9:28 ` [Qemu-devel] [RFC PATCH v3 6/8] kbd-state: use state tracker for vnc Gerd Hoffmann
2019-01-22 9:47 ` Daniel P. Berrangé
2019-01-22 9:28 ` [Qemu-devel] [RFC PATCH v3 7/8] keymap: pass full keyboard state to keysym2scancode Gerd Hoffmann
2019-01-22 9:28 ` [Qemu-devel] [RFC PATCH v3 8/8] keymap: fix keyup mappings 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=20190122094720.GC13143@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 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).