Ticket #4111 (closed defect: fixed)
Mac OSX Host: Numlock Misbehaves When Focus Changes from Host-to-Guest
|Reported by:||HipHoppity||Owned by:|
|Version:||VirtualBox 2.2.2||Keywords:||numeric keypad numlock|
|Host type:||Mac OS X|
Description (last modified by frank) (diff)
I use an Apple extended keyboard (includes numeric keypad). I've noticed odd behavior with numlock for the numeric keypad when focus is switched from the Host-to-Guest. In summary one of two things happens:
- Switching from the Host-to-Guest requires the numlock to be activated twice.
- Numlock activates on every-other Host-to-Guest switch in focus.
This behavior is reproducible with VBox 2.2.2 using Mac OSX (Leopard) Host and WinXP Guest as outlined below.
First: Set-up Guest in Fullscreen Mode in its own Space
I prefer to run in Fullscreen Mode with a WinXP guest in its own Space. I like to easily switch Spaces back and forth with ctrl-arrow. You can do this if you do the following:
- Shutdown your VM.
- In the "VirtualBox" menu go to "Preferences . . .".
- In the Preferences window, select "Input".
- In the Input menu unselect the "Auto Capture Keyboard" checkbox.
- Restart your VM and fast Space switching works similar to Parallels -- use your shortcut (ctrl-arrow, etc.) without first using host key (e.g. left-).
Now on to unusual behavior with a numeric keypad. . .
I have an iMac with an Apple wireless extended Mac keyboard (i.e. numeric keypad included) and I do a lot of number entry in my work. With this keyboard the "numlock" is the key combination "shift-clear". When switching Spaces from Mac use (I'll call it a "Mac Space" from here on) back to my VBox guest WinXP ("Guest Space" from now on) the numlock is off. To turn the numlock back on I have to do the "shift-clear" twice to resume use of the numeric keypad in the Guest Space. Now here is another strange thing I noticed, if you switch Spaces 2x using the configuration outlined above the numlock comes back on without activating it.
Since this numlock behavior might be a bit hard to follow from the above, you can see it in action for yourself with the following experiment:
- Set up your VM for fast Spaces switching as outlined above and start your VBox VM in Fullscreen Mode (Guest Space).
- In your VM Guest Space (WinXP in my case) start Notepad and numlock (shift-clear) the numeric keypad.
- Type "4444" in Notepad using the numeric keypad.
- Switch (crtl-arrow) back to a Mac Space.
- Switch back to the Guest Space and hit "4" on your numeric keypad. Since numlock is off it now acts as an arrow key and you should see the cursor go back one space.
- Switch back to a Mac Space and then again switch back to the Guest Space.
- Now type "6" in Notepad. Notice the numlock is now activated without pressing shift-clear. You should end up with 44464 in your Notepad window.
Pretty weird! This just demonstrates this problem of the numlock reactivating on every-other Space switch from Mac Space to Guest Space. Otherwise you have to activate the numlock twice to use the numeric keypad after a change in focus. This seems to be a Virtualbox 2.2.2 bug. If you have a work-around to keep a numeric keypad enabled during Host-to-Guest focus changes (as with my Space switching) please let me know.
comment:12 Changed 19 months ago by frank
- Status changed from new to closed
- Resolution set to fixed
- Description modified (diff)
comment:13 Changed 14 months ago by adam_sq213
- Status changed from closed to reopened
- Resolution fixed deleted