qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] fix usb hid usage id table


From: 홍도형
Subject: [Qemu-devel] [PATCH] fix usb hid usage id table
Date: Mon, 26 Mar 2012 09:54:39 +0000 (GMT)

Add(or fix) following key conversions
- 0x3a -> 0x39 : CapsLock
- 0x56 -> 0x64 : Europe 2
- 0x59 -> 0x67 : Keypad =
- 0x5c -> 0x8c : Keyboard Int’l 6(PC9800 Keypad)
- 0x64 -> 0x68 : F13
- 0x65 -> 0x69 : F14
- 0x66 -> 0x6a : F15
- 0x67 -> 0x6b : F16
- 0x68 -> 0x6c : F17
- 0x69 -> 0x6d : F18
- 0x6a -> 0x6e : F19
- 0x6b -> 0x6f : F20
- 0x6c -> 0x70 : F21
- 0x6d -> 0x71 : F22
- 0x6e -> 0x72 : F23
- 0x70 -> 0x88 : Keyboard Int’l 2(Katakana/Hiragana)
- 0x73 -> 0x87 : Keyboard Int’l 1
- 0x76 -> 0x73 : F24        (or 0x76 -> 0x94 : Keyboard Int’l 5)
- 0x77 -> 0x93 : Keyboard Lang 4 (Hiragana)
- 0x78 -> 0x92 : Keyboard Lang 3 (Katakana)
- 0x79 -> 0x8a : Keyboard Int’l 4
- 0x7b -> 0x8b : Keyboard Int’l 5
- 0x7d -> 0x89 : Keyboard Int’l 2(Yen)
- 0x7e -> 0x85 : Keypad , (Brazilian Keypad .)
- 0xc6 -> 0x48 : Break(Ctl-Pause)
- 0xde -> 0x66 : Keyboard Power
- 0xf1 -> 0x91 : Keyboard Lang 2 (Hanja)
- 0xf2 -> 0x90 : Keyboard Lang 1 (Hanguel/English)
- 0xfc -> 0x02 : POST Fail
- 0xff -> 0x01 : Overrun Error

Signed-off-by : Dohyung Hong <address@hidden>
---
diff --git a/hw/hid.c b/hw/hid.c
index 03761ab..d3a0f65 100644
--- a/hw/hid.c
+++ b/hw/hid.c
@@ -41,15 +41,15 @@ static const uint8_t hid_usage_keys[0x100] = {
     0x07, 0x09, 0x0a, 0x0b, 0x0d, 0x0e, 0x0f, 0x33,
     0x34, 0x35, 0xe1, 0x31, 0x1d, 0x1b, 0x06, 0x19,
     0x05, 0x11, 0x10, 0x36, 0x37, 0x38, 0xe5, 0x55,
-    0xe2, 0x2c, 0x32, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e,
+    0xe2, 0x2c, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e,
     0x3f, 0x40, 0x41, 0x42, 0x43, 0x53, 0x47, 0x5f,
     0x60, 0x61, 0x56, 0x5c, 0x5d, 0x5e, 0x57, 0x59,
-    0x5a, 0x5b, 0x62, 0x63, 0x00, 0x00, 0x00, 0x44,
-    0x45, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e,
-    0xe8, 0xe9, 0x71, 0x72, 0x73, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65,
+    0x5a, 0x5b, 0x62, 0x63, 0x00, 0x64, 0x00, 0x44,
+    0x45, 0x67, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00,
+    0xe8, 0xe9, 0x00, 0x00, 0x68, 0x69, 0x6a, 0x6b,
+    0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x00,
+    0x88, 0x00, 0x00, 0x87, 0x00, 0x00, 0x73, 0x93,
+    0x92, 0x8a, 0x00, 0x8b, 0x00, 0x89, 0x85, 0x00,

     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -59,14 +59,14 @@ static const uint8_t hid_usage_keys[0x100] = {
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x46,
     0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x4a,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x4a,
     0x52, 0x4b, 0x00, 0x50, 0x00, 0x4f, 0x00, 0x4d,
     0x51, 0x4e, 0x49, 0x4c, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65, 0x66, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x91, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01,
};

 bool hid_has_events(HIDState *hs)
---

 

 


reply via email to

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