qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL 03/11] ps2: Fix lost scancodes by recent changes


From: Gerd Hoffmann
Subject: [Qemu-devel] [PULL 03/11] ps2: Fix lost scancodes by recent changes
Date: Wed, 4 Jan 2017 12:21:15 +0100

From: OGAWA Hirofumi <address@hidden>

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 what I found in using.

Signed-off-by: OGAWA Hirofumi <address@hidden>
Reviewed-by: Hervé Poussineau <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
---
 hw/input/ps2.c    | 3 +++
 qapi-schema.json  | 3 ++-
 ui/input-keymap.c | 3 +++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index 0d14de0..3b47da4 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -394,6 +394,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,
 };
 
diff --git a/qapi-schema.json b/qapi-schema.json
index a0d3b5d..fd5b9d7 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3642,7 +3642,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




reply via email to

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