From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: berrange@redhat.com, Gerd Hoffmann <kraxel@redhat.com>,
Eric Blake <eblake@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: [Qemu-devel] [PATCH 4/5] ui: add multimedia keys
Date: Wed, 26 Jul 2017 13:56:36 +0200 [thread overview]
Message-ID: <20170726115637.21558-5-kraxel@redhat.com> (raw)
In-Reply-To: <20170726115637.21558-1-kraxel@redhat.com>
Add multimedia keys to QKeyCodes and to the keymaps.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/input-keymap.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
qapi-schema.json | 17 ++++++++++++++++-
2 files changed, 60 insertions(+), 1 deletion(-)
diff --git a/ui/input-keymap.c b/ui/input-keymap.c
index 7461e1edde..ae781beae9 100644
--- a/ui/input-keymap.c
+++ b/ui/input-keymap.c
@@ -116,6 +116,28 @@ static int linux_to_qcode[KEY_CNT] = {
[KEY_LEFTMETA] = Q_KEY_CODE_META_L,
[KEY_RIGHTMETA] = Q_KEY_CODE_META_R,
[KEY_MENU] = Q_KEY_CODE_MENU,
+
+ [KEY_SLEEP] = Q_KEY_CODE_SLEEP,
+ [KEY_WAKEUP] = Q_KEY_CODE_WAKE,
+ [KEY_CALC] = Q_KEY_CODE_CALCULATOR,
+ [KEY_MAIL] = Q_KEY_CODE_MAIL,
+ [KEY_COMPUTER] = Q_KEY_CODE_COMPUTER,
+
+ [KEY_STOP] = Q_KEY_CODE_AC_STOP,
+ [KEY_BOOKMARKS] = Q_KEY_CODE_AC_BOOKMARKS,
+ [KEY_BACK] = Q_KEY_CODE_AC_BACK,
+ [KEY_FORWARD] = Q_KEY_CODE_AC_FORWARD,
+ [KEY_HOMEPAGE] = Q_KEY_CODE_AC_HOME,
+ [KEY_REFRESH] = Q_KEY_CODE_AC_REFRESH,
+ [KEY_FIND] = Q_KEY_CODE_AC_SEARCH,
+
+ [KEY_NEXTSONG] = Q_KEY_CODE_AUDIONEXT,
+ [KEY_PREVIOUSSONG] = Q_KEY_CODE_AUDIOPREV,
+ [KEY_STOPCD] = Q_KEY_CODE_AUDIOSTOP,
+ [KEY_PLAYCD] = Q_KEY_CODE_AUDIOPLAY,
+ [KEY_MUTE] = Q_KEY_CODE_AUDIOMUTE,
+ [KEY_VOLUMEDOWN] = Q_KEY_CODE_VOLUMEDOWN,
+ [KEY_VOLUMEUP] = Q_KEY_CODE_VOLUMEUP,
};
static const int qcode_to_number[] = {
@@ -252,6 +274,28 @@ static const int qcode_to_number[] = {
[Q_KEY_CODE_YEN] = 0x7d,
[Q_KEY_CODE_KP_COMMA] = 0x7e,
+ [Q_KEY_CODE_SLEEP] = 0xdf,
+ [Q_KEY_CODE_WAKE] = 0xe3,
+ [Q_KEY_CODE_CALCULATOR] = 0xa1,
+ [Q_KEY_CODE_MAIL] = 0xec,
+ [Q_KEY_CODE_COMPUTER] = 0xeb,
+
+ [Q_KEY_CODE_AC_STOP] = 0xe8,
+ [Q_KEY_CODE_AC_BOOKMARKS] = 0xe6,
+ [Q_KEY_CODE_AC_BACK] = 0xea,
+ [Q_KEY_CODE_AC_FORWARD] = 0xe9,
+ [Q_KEY_CODE_AC_HOME] = 0xb2,
+ [Q_KEY_CODE_AC_REFRESH] = 0xe7,
+ [Q_KEY_CODE_AC_SEARCH] = 0xe5,
+
+ [Q_KEY_CODE_AUDIONEXT] = 0x99,
+ [Q_KEY_CODE_AUDIOPREV] = 0x90,
+ [Q_KEY_CODE_AUDIOSTOP] = 0xa4,
+ [Q_KEY_CODE_AUDIOPLAY] = 0xa2,
+ [Q_KEY_CODE_AUDIOMUTE] = 0xa0,
+ [Q_KEY_CODE_VOLUMEDOWN] = 0xae,
+ [Q_KEY_CODE_VOLUMEUP] = 0xb0,
+
[Q_KEY_CODE__MAX] = 0,
};
diff --git a/qapi-schema.json b/qapi-schema.json
index 9c6c3e1a53..93ff0f3921 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4843,6 +4843,16 @@
# @henkan: since 2.9
# @yen: since 2.9
#
+# @sleep: since 2.10
+# @wake: since 2.10
+# @audio*: since 2.10
+# @volume*: since 2.10
+# @mediaselect: since 2.10
+# @mail: since 2.10
+# @calculator: since 2.10
+# @computer: since 2.10
+# @ac_*: since 2.10
+#
# Since: 1.3.0
#
##
@@ -4864,7 +4874,12 @@
'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
'ro', 'hiragana', 'henkan', 'yen',
- 'kp_comma', 'kp_equals', 'power' ] }
+ 'kp_comma', 'kp_equals', 'power', 'sleep', 'wake',
+ 'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute',
+ 'volumeup', 'volumedown', 'mediaselect',
+ 'mail', 'calculator', 'computer',
+ 'ac_search', 'ac_home', 'ac_back', 'ac_forward', 'ac_stop',
+ 'ac_refresh', 'ac_bookmarks' ] }
##
# @KeyValue:
--
2.9.3
next prev parent reply other threads:[~2017-07-26 11:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-26 11:56 [Qemu-devel] [PATCH 0/5] ui: keymap fixes for 2.10 Gerd Hoffmann
2017-07-26 11:56 ` [Qemu-devel] [PATCH 1/5] ui: add next and prior keysyms Gerd Hoffmann
2017-07-26 12:00 ` Eric Blake
2017-07-26 11:56 ` [Qemu-devel] [PATCH 2/5] ui: move qemu_input_linux_to_qcode() Gerd Hoffmann
2017-07-26 12:14 ` Eric Blake
2017-07-26 11:56 ` [Qemu-devel] [PATCH 3/5] ui: update keymaps Gerd Hoffmann
2017-07-26 12:25 ` Eric Blake
2017-07-26 11:56 ` Gerd Hoffmann [this message]
2017-07-26 12:02 ` [Qemu-devel] [PATCH 4/5] ui: add multimedia keys Eric Blake
2017-07-26 12:08 ` Daniel P. Berrange
2017-07-26 12:12 ` Eric Blake
2017-07-26 12:38 ` Gerd Hoffmann
2017-07-26 12:24 ` Eric Blake
2017-07-26 12:39 ` Gerd Hoffmann
2017-07-26 11:56 ` [Qemu-devel] [PATCH 5/5] ps2: enable " Gerd Hoffmann
2017-07-26 12:26 ` Eric Blake
2017-07-26 12:09 ` [Qemu-devel] [PATCH 0/5] ui: keymap fixes for 2.10 no-reply
2017-07-26 12:22 ` Eric Blake
2017-07-26 12:49 ` Gerd Hoffmann
2017-07-26 13:06 ` Eric Blake
2017-08-08 9:20 ` Markus Armbruster
2017-08-08 15:04 ` Eric Blake
2017-08-14 6:56 ` Markus Armbruster
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=20170726115637.21558-5-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@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).