VMWare keyboard issues with Linux host
For a long time, after entering the guest OS in a VMware Session, I got my keyboard configuration (key repeat, ...) messed up.
I also got wrong key configuration in the guest OS.
Recently, I found a solution in another blog from Lain (http://nthrbldyblg.blogspot.fr/2008/06/vmware-and-fubar-keyboard-effect.html)
To solve my problems, in /etc/vmware/config :
1) add the following line:
xkeymap.nokeycodeMap = true
2) If some keys are still not correctly mapped, add key maps like:
xkeymap.keycode.108 = 0x138 # Alt_R
Where 108 is the keycode, and 0x138 the scancode.
You'll get a lot of output, and one like the following:
KeyPress event, serial 34, synthetic NO, window 0x3a00001,
root 0x2c9, subw 0x3a00002, time 1210037349, (26,59), root:(2657,596),
state 0x2010, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XKeysymToKeycode returns keycode: 92
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
In this output, one can find the keycode (108 here).
I put a copy herein for convenience:
These are the v-scan codes for the 104-key U.S. keyboard:
The 84-key keyboard has a Sys Req key on the numeric pad:
Keyboards outside the U.S. usually have an extra key (often < > or < > | ) next to the left shift key:
I also got wrong key configuration in the guest OS.
Recently, I found a solution in another blog from Lain (http://nthrbldyblg.blogspot.fr/2008/06/vmware-and-fubar-keyboard-effect.html)
To solve my problems, in /etc/vmware/config :
1) add the following line:
xkeymap.nokeycodeMap = true
2) If some keys are still not correctly mapped, add key maps like:
xkeymap.keycode.108 = 0x138 # Alt_R
Where 108 is the keycode, and 0x138 the scancode.
Keycode
Lain proposes a method to find the key codes using xev. Type xev in a console, and in the xev window, type the key from which you want the keycode. The output from xev is displayed in the console from which it was launched.You'll get a lot of output, and one like the following:
KeyPress event, serial 34, synthetic NO, window 0x3a00001,
root 0x2c9, subw 0x3a00002, time 1210037349, (26,59), root:(2657,596),
state 0x2010, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XKeysymToKeycode returns keycode: 92
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
In this output, one can find the keycode (108 here).
Scancode
The scancode can be found here (http://www.vmware.com/support/ws55/doc/ws_devices_keymap_vscan.html).I put a copy herein for convenience:
These are the v-scan codes for the 104-key U.S. keyboard:
The 84-key keyboard has a Sys Req key on the numeric pad:
Keyboards outside the U.S. usually have an extra key (often < > or < > | ) next to the left shift key:
0 Comments:
Post a Comment
<< Home