From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
Gerd Hoffmann <kraxel@redhat.com>, Eric Blake <eblake@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: [Qemu-devel] [PULL v2 11/11] ps2: Fix lost scancodes by recent changes
Date: Mon, 9 Jan 2017 14:09:45 +0100 [thread overview]
Message-ID: <1483967385-12891-12-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1483967385-12891-1-git-send-email-kraxel@redhat.com>
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
With "ps2: use QEMU qcodes instead of scancodes", key handling was
changed to qcode base. But all scancodes are not converted to new one.
This adds some missing qcodes/scancodes what I found in using.
[set1 and set3 are from <hpoussin@reactos.org>]
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/input/ps2.c | 10 ++++++++++
qapi-schema.json | 6 +++++-
ui/input-keymap.c | 3 +++
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index 0d14de0..8485a4e 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -252,6 +252,9 @@ static const uint16_t qcode_to_keycode_set1[Q_KEY_CODE__MAX] = {
[Q_KEY_CODE_ASTERISK] = 0x37,
[Q_KEY_CODE_LESS] = 0x56,
[Q_KEY_CODE_RO] = 0x73,
+ [Q_KEY_CODE_HIRAGANA] = 0x70,
+ [Q_KEY_CODE_HENKAN] = 0x79,
+ [Q_KEY_CODE_YEN] = 0x7d,
[Q_KEY_CODE_KP_COMMA] = 0x7e,
};
@@ -394,6 +397,9 @@ static const uint16_t qcode_to_keycode_set2[Q_KEY_CODE__MAX] = {
[Q_KEY_CODE_LESS] = 0x61,
[Q_KEY_CODE_SYSRQ] = 0x7f,
[Q_KEY_CODE_RO] = 0x51,
+ [Q_KEY_CODE_HIRAGANA] = 0x13,
+ [Q_KEY_CODE_HENKAN] = 0x64,
+ [Q_KEY_CODE_YEN] = 0x6a,
[Q_KEY_CODE_KP_COMMA] = 0x6d,
};
@@ -504,6 +510,10 @@ static const uint16_t qcode_to_keycode_set3[Q_KEY_CODE__MAX] = {
[Q_KEY_CODE_COMMA] = 0x41,
[Q_KEY_CODE_DOT] = 0x49,
[Q_KEY_CODE_SLASH] = 0x4a,
+
+ [Q_KEY_CODE_HIRAGANA] = 0x87,
+ [Q_KEY_CODE_HENKAN] = 0x86,
+ [Q_KEY_CODE_YEN] = 0x5d,
};
static uint8_t translate_table[256] = {
diff --git a/qapi-schema.json b/qapi-schema.json
index a0d3b5d..eab8d4a 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3618,6 +3618,9 @@
# @kp_comma: since 2.4
# @kp_equals: since 2.6
# @power: since 2.6
+# @hiragana: since 2.9
+# @henkan: since 2.9
+# @yen: since 2.9
#
# An enumeration of key name.
#
@@ -3642,7 +3645,8 @@
'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
- 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro',
+ 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
+ 'ro', 'hiragana', 'henkan', 'yen',
'kp_comma', 'kp_equals', 'power' ] }
##
diff --git a/ui/input-keymap.c b/ui/input-keymap.c
index f1e700d..8a1476f 100644
--- a/ui/input-keymap.c
+++ b/ui/input-keymap.c
@@ -131,6 +131,9 @@ static const int qcode_to_number[] = {
[Q_KEY_CODE_DELETE] = 0xd3,
[Q_KEY_CODE_RO] = 0x73,
+ [Q_KEY_CODE_HIRAGANA] = 0x70,
+ [Q_KEY_CODE_HENKAN] = 0x79,
+ [Q_KEY_CODE_YEN] = 0x7d,
[Q_KEY_CODE_KP_COMMA] = 0x7e,
[Q_KEY_CODE__MAX] = 0,
--
1.8.3.1
next prev parent reply other threads:[~2017-01-09 13:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-09 13:09 [Qemu-devel] [PULL v2 00/11] ui patch queue Gerd Hoffmann
2017-01-09 13:09 ` [Qemu-devel] [PULL v2 01/11] ui/gtk: fix crash at startup when no console is available Gerd Hoffmann
2017-01-09 13:09 ` [Qemu-devel] [PULL v2 02/11] ui: use evdev keymap when running under wayland Gerd Hoffmann
2017-01-16 9:31 ` Daniel P. Berrange
2017-01-09 13:09 ` [Qemu-devel] [PULL v2 03/11] console: add API to get underlying gui window ID Gerd Hoffmann
2017-01-09 13:09 ` [Qemu-devel] [PULL v2 04/11] console: move window ID code from baum to sdl Gerd Hoffmann
2017-01-09 13:09 ` [Qemu-devel] [PULL v2 05/11] sdl2: set window ID Gerd Hoffmann
2017-01-12 15:10 ` Stefan Weil
2017-01-12 15:56 ` Gerd Hoffmann
2017-01-12 17:05 ` Samuel Thibault
2017-01-12 19:07 ` Stefan Weil
2017-01-09 13:09 ` [Qemu-devel] [PULL v2 06/11] egl-helpers: Change file licensing to LGPLv2 Gerd Hoffmann
2017-01-09 13:09 ` [Qemu-devel] [PULL v2 07/11] gtk: avoid oob array access Gerd Hoffmann
2017-01-09 13:09 ` [Qemu-devel] [PULL v2 08/11] ui: drop unused MOUSE_EVENT_WHEEL{UP, DN} defines Gerd Hoffmann
2017-01-09 13:09 ` [Qemu-devel] [PULL v2 09/11] ui/vnc: Fix problem with sending too many bytes as server name Gerd Hoffmann
2017-01-09 13:09 ` [Qemu-devel] [PULL v2 10/11] curses: Fix compiler warnings (Mingw-w64 redefinition of macro KEY_EVENT) Gerd Hoffmann
2017-01-09 13:09 ` Gerd Hoffmann [this message]
2017-01-09 13:49 ` [Qemu-devel] [PULL v2 00/11] ui patch queue Peter Maydell
2017-01-10 7:18 ` Gerd Hoffmann
2017-01-10 17:32 ` Peter Maydell
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=1483967385-12891-12-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=hirofumi@mail.parknet.co.jp \
--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).