qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v2] Fixes key mapping so all keys work


From: Programmingkid
Subject: [Qemu-devel] [PATCH v2] Fixes key mapping so all keys work
Date: Thu, 15 Jan 2015 16:13:18 -0500

Fixes keyboard mapping so right shift, right command, right option, right 
control, keypad period, keypad '=', keypad enter, and F13 all work.
 
Signed-off-by: John Arbuckle <address@hidden>

---
Undid most changes to keyboard map in cocoa.m.
Most changes made to keyboard map in adb.c. 
Since there is no keypad '=' key for the PC/AT or PC/XT layouts, I had to 
invent my own number for it. It works for the Mac OS X guest. Guest like 
Windows XP are not effected because they don't use the Macintosh keyboard 
layout.

Signed-off-by: John Arbuckle <address@hidden>

---
 hw/input/adb.c |    8 ++++----
 ui/cocoa.m     |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/hw/input/adb.c b/hw/input/adb.c
index 34c8058..aa7287f 100644
--- a/hw/input/adb.c
+++ b/hw/input/adb.c
@@ -182,12 +182,12 @@ static const uint8_t pc_to_adb_keycode[256] = {
  84, 85, 82, 65,  0,  0, 10,103,111,  0,  0,110, 81,  0,  0,  0,
   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-  0,  0,  0, 94,  0, 93,  0,  0,  0,  0,  0,  0,104,102,  0,  0,
-  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 76,125,  0,  0,
+  0,  81, 0, 94,  0, 93,  0,  0,  0,  0,  0,  0,104,102,  0,  0,
+  0,  0,  0,  0,  0,  0,  0,  0, 76,  0,  0,  0, 76, 54,  0,  0,
   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,105,  0,  0,  0,  0,  0,
-  0,  0,  0,  0,  0, 75,  0,  0,124,  0,  0,  0,  0,  0,  0,  0,
+  0,  0,  0,  0,  0, 75,  0,105, 58,  0,  0,  0,  0,  0,  0,  0,
   0,  0,  0,  0,  0,  0,  0,115, 62,116,  0, 59,  0, 60,  0,119,
- 61,121,114,117,  0,  0,  0,  0,  0,  0,  0, 55,126,  0,127,  0,
+ 61,121,114,117,  0,  0,  0,  0,  0,  0,  0, 55, 55,  0,127,  0,
   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
   0,  0,  0,  0,  0, 95,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
 };
diff --git a/ui/cocoa.m b/ui/cocoa.m
index c8535a3..456f942 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -139,7 +139,7 @@ int keymap[] =
     157,//  62      0x3E    0x9d    E0,1D   R CTRL  QZ_RCTRL
     0,  //  63      0x3F    Undefined
     0,  //  64      0x40    Undefined
-    0,  //  65      0x41    Undefined
+    83, //  65      0x41    0x53            KP .    QZ_KP_PERIOD
     0,  //  66      0x42    Undefined
     55, //  67      0x43    0x37            KP *    QZ_KP_MULTIPLY
     0,  //  68      0x44    Undefined
@@ -155,7 +155,7 @@ int keymap[] =
     74, //  78      0x4E    0x4a            KP -    QZ_KP_MINUS
     0,  //  79      0x4F    Undefined
     0,  //  80      0x50    Undefined
-    0,  //  81      0x51                            QZ_KP_EQUALS
+    129,//  81      0x51    0x51            KP =    QZ_KP_EQUALS
     82, //  82      0x52    0x52            KP 0    QZ_KP0
     79, //  83      0x53    0x4f            KP 1    QZ_KP1
     80, //  84      0x54    0x50            KP 2    QZ_KP2
-- 
1.7.5.4




reply via email to

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