RightAlt does not work for kor/eng toggle in xp guest

Discussions about using Windows guests in VirtualBox.
Post Reply
shameimaru
Posts: 7
Joined: 15. Sep 2008, 02:08

RightAlt does not work for kor/eng toggle in xp guest

Post by shameimaru »

I have had this strange issue that kept mysteriously disappearing only to creep back on randomly with different vbox updates.

For typical western 101/103 keyboards that lack the kor/eng toggle key found on korean 102/104 keyboards, RightAlt is used instead for this purpose. There is another key for hanja conversion, which happens to collide with RightCtrl - the host key for vbox by default - though the vbox host can be reconfigured to another keystroke so this is no big deal.

The real problem I am having is, depending on the version of vbox client / guest addition I have installed on my machine, the guest fails to assign RightAlt for kore/eng toggle. Two interesting tidbits that I've noticed:

1) toggling thru RightAlt works just fine with XP installed fresh out of the box. Installing guest addition seems to break it right away.
2) Strangely, the guests built from the same xp images never had this issue on linux (ubuntu) hosts.

The very first thing I've tried was changing the keyboard identifier in the registry with couple other changes here and there. This is known to work well in most cases with misbehaving toggle keys, but no luck there.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters]
"PollingIterations"=dword:00002ee0
"PollingIterationsMaximum"=dword:00002ee0
"ResendIterations"=dword:00000003
"LayerDriver JPN"="kbd101.dll"
"LayerDriver KOR"="kbd101a.dll"
"OverrideKeyboardType"=dword:00000008
"OverrideKeyboardSubtype"=dword:00000003
"OverrideKeyboardIdentifier"="kbd101c.dll"
"KeyboardFailedReset"=dword:00000000

Then I have discovered the two keys in question (kor/eng toggle and hanja conversion) have scancodes (in hex): 72 00 and 71 00, respectively. (Technically, their make codes are F2 and F1, but whoever assigned these codes was silly enough to use numbers in the region where programs would normally expect a break key, and these two keys don't even have break codes to begin with :roll: So in practice people just treat them as 72 00 and 71 00 instead lest they should confuse whatever poor program that happens to take the input). Tried mapping RightAlt (38 E0) and RightCtrl (1D E0) to the above two via scancode map in the guest's registry, and this didn't work either. As the last resort, I sent keyboardputscancode command to the guest thru vboxmanage:

vboxmanage controlvm guestname keyboardputscancode 72 00

the output looked like it should (scancode[0] 0x72 scancode[1] 0x00), but the guest was still registering RightAlt only (as opposed to kor/eng it should have been). That pretty much leaves me out of options, which is what brings me here to ask you guys for some help. I am guessing this somehow has to do with whatever the guest addition (or the windows version of it anyway) does to the way vbox passes scan code for user input to the guest OS. Just a wild guess though.

Oh, the korean IME on the guest OS isn't broken, I could still use the mouse pointer to click on the kor/eng button on the language bar GUI. It's just a huge PITA to take your hand off the keyboard when you have to type mixed sentences that alternate between the two languages.
klaus
Oracle Corporation
Posts: 1335
Joined: 10. May 2007, 14:57

Re: RightAlt does not work for kor/eng toggle in xp guest

Post by klaus »

The MAKE code for those keys is 0xf2 or 0xf1 according to my information (and they indeed have no break code), so what you sent with VBoxManage is wrong. In particular their scan code is only a single byte, so the 00 you have is wrong too.

If someone could test the Korean keyboard peculiarities it would be greatly appreciated. We know that if you switch the keyboard to USB mode that the hangul/hanja keys were broken, for that we could offer a test build.

Korean keyboards are nearly impossible to get hold of...
Post Reply