I contributed the original evdev keyboard support patch to VBoxSDL a while
ago, and just noticed that more keycodes have been added in
src/VBox/Frontends/VirtualBox4/src/X11/keyboard-types.h
This patch just adds those keycodes to VBoxSDL.cpp.
See attached
~JW
Index: src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
===================================================================
--- src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp (revision 14486)
+++ src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp (working copy)
@@ -3201,9 +3201,9 @@
// these values are simply pulled from x_keycode_to_pc_keycode
// not a whole lot of testing of the 'weird' values has taken
// place (I don't own a Japanese or Korean keyboard)
- static const uint16_t evdev_keycode_to_pc_keycode[61] =
+ static const uint16_t evdev_keycode_to_pc_keycode[159] =
{
- 0x0, /* 97 EVDEV - RO ("Internet" Keyboards) */
+ 0x73, /* 97 EVDEV - RO ("Internet" Keyboards) */
0x0, /* 98 EVDEV - KATA (Katakana) */
0x0, /* 99 EVDEV - HIRA (Hiragana) */
0x79, /* 100 EVDEV - HENK (Henkan) */
@@ -3228,45 +3228,56 @@
0x53|0x100, /* 119 EVDEV - DELE */
0x0, /* 120 EVDEV - I120 ("Internet" Keyboards) */
//121-124 Solaris Compatibilty Stuff
- 0x0, /* 121 EVDEV - MUTE */
- 0x0, /* 122 EVDEV - VOL- */
- 0x0, /* 123 EVDEV - VOL+ */
- 0x0, /* 124 EVDEV - POWR */
+ 0x20|0x100, /* 121 EVDEV - MUTE */
+ 0x2e|0x100, /* 122 EVDEV - VOL- */
+ 0x30|0x100, /* 123 EVDEV - VOL+ */
+ 0x5e|0x100, /* 124 EVDEV - POWR */
0x0, /* 125 EVDEV - KPEQ */
0x0, /* 126 EVDEV - I126 ("Internet" Keyboards) */
- 0x0, /* 127 EVDEV - PAUS */
+ 0x45, /* 127 EVDEV - PAUS */
0x0, /* 128 EVDEV - ???? */
- 0x0, /* 129 EVDEV - I129 ("Internet" Keyboards) */
- 0xf1, /* 130 EVDEV - HNGL (Korean Hangul Latin toggle) */
- 0xf2, /* 131 EVDEV - HJCV (Korean Hangul Hanja toggle) */
+ 0x53, /* 129 EVDEV - I129 ("Internet" Keyboards) */
+ 0xf2, /* 130 EVDEV - HNGL (Korean Hangul Latin toggle) */
+ 0xf1, /* 131 EVDEV - HJCV (Korean Hangul Hanja toggle) */
0x7d, /* 132 EVDEV - AE13 (Yen) */
0x5b|0x100, /* 133 EVDEV - LWIN */
0x5c|0x100, /* 134 EVDEV - RWIN */
0x5d|0x100, /* 135 EVDEV - MENU */
//136-146 Solaris Stuff
- 0x0, /* 136 EVDEV - STOP */
- 0x0, /* 137 EVDEV - AGAI */
- 0x0, /* 138 EVDEV - PROP */
- 0x0, /* 139 EVDEV - UNDO */
- 0x0, /* 140 EVDEV - FRNT */
- 0x0, /* 141 EVDEV - COPY */
- 0x0, /* 142 EVDEV - OPEN */
- 0x0, /* 143 EVDEV - PAST */
- 0x0, /* 144 EVDEV - FIND */
- 0x0, /* 145 EVDEV - CUT */
- 0x0, /* 146 EVDEV - HELP */
+ 0x68|0x100, /* 136 EVDEV - STOP */
+ 0x05|0x100, /* 137 EVDEV - AGAI */
+ 0x06|0x100, /* 138 EVDEV - PROP */
+ 0x07|0x100, /* 139 EVDEV - UNDO */
+ 0x0c|0x100, /* 140 EVDEV - FRNT */
+ 0x18|0x100, /* 141 EVDEV - COPY */
+ 0x65, /* 142 EVDEV - OPEN */
+ 0x0a|0x100, /* 143 EVDEV - PAST */
+ 0x10|0x100, /* 144 EVDEV - FIND */
+ 0x17|0x100, /* 145 EVDEV - CUT */
+ 0x75|0x100, /* 146 EVDEV - HELP */
//Extended Keys ("Internet" Keyboards)
0x0, /* 147 EVDEV - I147 */
0x0, /* 148 EVDEV - I148 */
0x0, /* 149 EVDEV - I149 */
- 0x0, /* 150 EVDEV - I150 */
- 0x0, /* 151 EVDEV - I151 */
+ 0x5f|0x100, /* 150 EVDEV - I150 */
+ 0x63|0x100, /* 151 EVDEV - I151 */
0x0, /* 152 EVDEV - I152 */
- 0x0, /* 153 EVDEV - I153 */
+ 0x19|0x100, /* 153 EVDEV - I153 */
0x0, /* 154 EVDEV - I154 */
0x0, /* 155 EVDEV - I156 */
0x0, /* 156 EVDEV - I157 */
0x0, /* 157 EVDEV - I158 */
+ 0x0, 0x0, 0x20|0x100, 0x0, 0x22|0x100, 0x6c|0x100, 0x24|0x100, 0x5f|0x100,
+ 0x6a|0x100, 0x69|0x100, 0x0, 0x0, 0x0, 0x19|0x100, 0x22|0x100, 0x10|0x100,
+ 0x2e|0x100, 0x0, 0x30|0x100, 0x0, 0x0, 0x0, 0x32|0x100, 0x67|0x100,
+ 0x40|0x100, 0x0, 0x0, 0x0b|0x100, 0x8b|0x100, 0x0, 0x0, 0x0, 0x05|0x100,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x38|0x100,
+ 0x0, 0x0, 0x0, 0x0, 0x22|0x100, 0x22|0x100, 0x0, 0x0, 0x0, 0x0, 0x40|0x100,
+ 0x22|0x100, 0x69|0x100, 0x0, 0x37|0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x65|0x100, 0x0, 0x0, 0x0, 0x65|0x100, 0x66|0x100, 0x67|0x100, 0x68|0x100,
+ 0x69|0x100, 0x6a|0x100, 0x6b|0x100, 0x6c|0x100, 0x6d|0x100, 0x0, 0x43|0x100,
+ 0x41|0x100, 0x0, 0x57|0x100, 0x05|0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
};
if (keycode < 9)
@@ -3278,7 +3289,7 @@
// just an offset (Xorg MIN_KEYCODE)
keycode -= 8;
}
- else if (keycode < 158 && guseEvdevKeymap)
+ else if (keycode < 249 && guseEvdevKeymap)
{
// apply EVDEV conversion table
keycode = evdev_keycode_to_pc_keycode[keycode - 97];
_______________________________________________
vbox-dev mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-dev