Page 1 of 1
About keyboard
Posted: 26. Nov 2009, 13:50
by demonstrate
Hi, I am not sure it is proper to post my problem here. If not, could you please tell me where to ask. I will be truly grateful.
I am using virtualbox for MS Windows. I can find a keyboard device in the guest OS with some drivers installed. So when I am typing some characters in the guest OS, it is virtualbox that captures my keyboard behaviors and translate those keystrokes for the virtual machine. But is the translated key strokes sent to the applications in Windows via the keyboard driver?
I am using one of the notorious net banks. It installs a proprietary ActiveX component to the IE in Windows. When my password is typed, it rejected to log in, saying that the input is not from local keyboard. I have searched the web and found out that It will even check whether the input is from local keyboard (PS or USB) or soft-keyboards. I am not sure it can discover it is running in a virtual machine though. But I think it is not that advanced. There is a saying that VMware users may cheat the ActiveX component into believing the input is from a true keyboard. Then I am a little curious why virtualbox can't make it.
My first guess is that maybe virtualbox isn't translating the key strokes from host to the keyboard driver Windows is using. Instead, it may send the key via something like RDP. But I don't know how to verify this. Would someone who knows about it or where to find the fact kindly tell me? It will be highly appreciated!
If my guess holds, is it possible to adjust the key sending procedure?
Many thanks!
Re: About keyboard
Posted: 26. Nov 2009, 13:54
by Sasquatch
It would have helped a great deal if you could tell us WHICH combinations you're having problems with. Also note if you changed the keyboard driver from the default and if the layout is that of your actual keyboard/Host setting.
Re: About keyboard
Posted: 26. Nov 2009, 14:20
by demonstrate
Sasquatch wrote:It would have helped a great deal if you could tell us WHICH combinations you're having problems with. Also note if you changed the keyboard driver from the default and if the layout is that of your actual keyboard/Host setting.
I am using Debian sid + experimental as the host. The virtualbox is open-source edition 3.0.10.
The guest OS is Windows XP professional, installed in virtualbox with only updates from Microsoft and no modification to hardware drivers.
The ActiveX component is installed on the guest (namely XP with IE 6). The problem is that this component (for logging into that net bank) rejects my password, saying it is not from local keyboard (namely the local keyboard of the virtual machine, I guess).
Is this information that you need? If you need more, please feel free to tell me.
Re: About keyboard
Posted: 26. Nov 2009, 14:33
by Sasquatch
Still have to repeat myself, and I really hate that.
WHICH keyboard shortcuts are not working!?
If you have a USB keyboard, install the PUEL version and pass the keyboard to the VM through USB. That's also an option.
Re: About keyboard
Posted: 26. Nov 2009, 14:51
by demonstrate
It is not SHORTCUTS that I am talking about.
I am saying this again. Hope I have made it clear.
I want to log into my netbank. It asks for my password. Usually there is a text box. I type mine there. There are asterisks in the text box. I think you must have seen a similar condition when you log into this forum.
But the netbank writes their own ActiveX component for "security". This ActiveX component has a text box for the password but it also detects the source of the keyboard strokes. E.g. if I am using some soft-keyboards provided by Microsoft, it won't let me log in.
It has nothing to do with SHORTCUTS, e.g. Ctrl-Alt-Delete.
Thanks!
Re: About keyboard
Posted: 26. Nov 2009, 15:04
by Sasquatch
You're the first to mention this. All VB does is send the event that's from the Host keyboard to the Guest. So if your key would send the code 0x85, that would be send to the Guest. The Guest then translates that code with it's layout mapping for the corresponding character. E.g. you have the Host set to US International, but the Guest to British, pressing Shift+3 would usually correspond to #, but the Guest would make it to the British Pound.
I gave you possible solution, take it or leave it. I don't see a reason why you don't have a real keyboard in the VM by default.
Re: About keyboard
Posted: 26. Nov 2009, 15:07
by demonstrate
BTW in previous tests done by other users of the netbank, they found if you run a native Windows XP with a PS/2 keyboard and another USB keyboards to the PC, the ActiveX component only recognizes the input from the PS/2 keyboard.
Re: About keyboard
Posted: 26. Nov 2009, 15:12
by Sasquatch
Then that plugin is messed up pretty bad. Some systems don't even have PS/2 connectors. The keyboard in VB is 'connected' through PS/2, because in the PUEL version you can enable USB, and the OSE doesn't even have USB.
Re: About keyboard
Posted: 26. Nov 2009, 15:17
by demonstrate
Sasquatch wrote:You're the first to mention this. All VB does is send the event that's from the Host keyboard to the Guest. So if your key would send the code 0x85, that would be send to the Guest. The Guest then translates that code with it's layout mapping for the corresponding character. E.g. you have the Host set to US International, but the Guest to British, pressing Shift+3 would usually correspond to #, but the Guest would make it to the British Pound.
I gave you possible solution, take it or leave it. I don't see a reason why you don't have a real keyboard in the VM by default.
Well... I am 100% sure the layout does not matter here. Hope my example sheds some light on what this ActiveX component does.
If the layout really matters, the password I type there is probably wrong. Then it might be more reasonable for the server from the bank to respond to me with a "wrong password". However, the password is not even sent. The ActiveX component somewhat recognizes that my typing is not from the local keyboard of the Windows XP.
Thanks for your previous advice on PUEL edition. I am trying to add another keyboard to the VM. But I am not quite optimistic about it either.
Re: About keyboard
Posted: 27. Nov 2009, 00:24
by MarkCranness
demonstrate wrote:So when I am typing some characters in the guest OS, it is virtualbox that captures my keyboard behaviors and translate those keystrokes for the virtual machine. But is the translated key strokes sent to the applications in Windows via the keyboard driver?
Based on looking at the OSE version source code, I think VirtualBox emulates a PS/2 i8042 controller for the keyboard, and creates virtual interrupts and virtual hardware port changes for keystrokes sent.
So as far as the guest is concerned there is a real live keyboard behind a real live hardware controller.
On my guest, Device Manager shows standard MS drivers for the keyboard device:
i8042prt.sys - Provider: Microsoft Corporation
kdbclass.sys - Provider: Microsoft Corporation
Re. Your comment about that ActiveX and USB keyboards: What happens if you boot the VM with USB disabled in the VirtualBox settings?
Perhaps keyboard input happens differently when the Guest Additions are not installed? Perhaps try un-installing the Guest Additions and seeing what happens then? (If it is acceptable to run that VM without Guest Additions)
(Certainly mouse input is different when GA is installed: it uses a mouse filter driver (installed somehow), but I can't see any evidence that keyboard input would be different.)
Of no relevance at all: I note that the Guest Additions for OSE does have its own i8042prt.sys file, used for a Windows NT4 mouse driver.
Re: About keyboard
Posted: 27. Nov 2009, 11:52
by mpack
demonstrate wrote:If the layout really matters, the password I type there is probably wrong
Have you tried simply opening up a text editor inside the guest and typing in the password in plain text? That will tell you if the layout matches the keyboard, and you are typing what you think you are.
Re: About keyboard
Posted: 28. Nov 2009, 15:10
by lyon
Hi All,
I am having the same problem.
Xwindows is presenting VirtualBox, but keyboard events are not
passed into ANY application (mouse events are working OK).
I have tried many different apps, and none of them are responding to
keyboard events.
I am running x-windows on my mac (and this works fine).
Virtualbox is running under fedora 12 alpha.
Ciao,
- DL
Re: About keyboard
Posted: 29. Nov 2009, 00:58
by MarkCranness
@lyon: Is this a recent P2V or V2V conversion? If so, then try using Device Manager to delete all keyboard devices and reboot the guest. 'My Computer' on the desktop>Right-click>Manage>Device Manager>Keyboards>(Select all keyboards under tree)>Right-click>Uninstall>repeat and reboot.
Try re-installing the Guest Additions? (section 4 of the user manual).