Ticket #4111 (closed defect: fixed)

Opened 8 years ago

Last modified 12 months ago

Mac OSX Host: Numlock Misbehaves When Focus Changes from Host-to-Guest

Reported by: HipHoppity Owned by:
Priority: major Component: VM control
Version: VirtualBox 2.2.2 Keywords: numeric keypad numlock
Cc: Guest type: Windows
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:

  1. Switching from the Host-to-Guest requires the numlock to be activated twice.
  2. 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:

  1. Shutdown your VM.
  2. In the "VirtualBox" menu go to "Preferences . . .".
  3. In the Preferences window, select "Input".
  4. In the Input menu unselect the "Auto Capture Keyboard" checkbox.
  5. 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:

  1. Set up your VM for fast Spaces switching as outlined above and start your VBox VM in Fullscreen Mode (Guest Space).
  2. In your VM Guest Space (WinXP in my case) start Notepad and numlock (shift-clear) the numeric keypad.
  3. Type "4444" in Notepad using the numeric keypad.
  4. Switch (crtl-arrow) back to a Mac Space.
  5. 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.
  6. Switch back to a Mac Space and then again switch back to the Guest Space.
  7. 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.

Change History

comment:1 Changed 8 years ago by HipHoppity

Installed version 2.2.4 today. Numlock bug still behaves as outlined above in original report for version 2.2.2.

comment:2 Changed 8 years ago by HipHoppity

I had the opportunity to borrow a standard ANSI USB keyboard with a numeric keypad (and regular Num Lock key) to test this bug. The bug behavior works the same way with the USB keyboard when I tried my WinXP / Notepad Mac OSX Space-switch experiment as outlined above.

comment:3 Changed 8 years ago by HipHoppity

Installed VirtualBox 3.0.0 today. Checked to see if Numlock problem described above had been worked out with the new version. Unfortunately this bug persists in the new version of VirtualBox 3. Please consider fixing this in VirtualBox 3.

comment:4 Changed 8 years ago by HipHoppity

After installing VirtualBox 3.0.2, I found that this unusual Numlock behavior persists in this latest version of VirtualBox. Please consider fixing this in VirtualBox 3.

comment:5 Changed 8 years ago by HipHoppity

VirtualBox 3.0.4 installed and Numlock strangeness continues with VM focus changes. Please address this in an upcoming build.

comment:6 Changed 7 years ago by HipHoppity

Numlock problem persists in VirtualBox 3.0.6.

comment:7 Changed 7 years ago by HipHoppity

Same Numlock problems with version 3.0.8.

comment:8 Changed 7 years ago by HipHoppity

I see this problem persists with the new VirtualBox 3.1.0 build. Please consider fixing this in an upcoming version of the VBox 3.1.x branch.

comment:9 Changed 7 years ago by HipHoppity

Update: Currently working with VirtualBox 3.1.6 -- Numlock problem remains unchanged. Any chance of addressing this in upcoming builds? Perhaps it could be included in the 3.2.x branch?

comment:10 Changed 7 years ago by filodej

I have the same (or similar) behavior on 3.1.8 version on Ubuntu 10.04 x86_64 host with Windows XP SP2 32-bit guest.

I started with 3.2.6 version but I experienced a huge memory leak - similar to one described in #6838 or #6918 and so downgraded to 3.1.8 (along with guest additions).

Then the leak was gone but I had some keyboard issues (like ones described in #3894). Switching to host system and back helped temporarily, but after the installation of SCIM packages and disabling screensaver (as recommended in the ticket) the problem seems to disappear permanently.

Now it is much better, however still from time to time (probably after switching from guest to host and back) it is necessary to re-activate the Numlock by pressing the Ctrl+Numlock once or more.

Hopefully this issue gets a higher priority and will be fixed eventually.

comment:11 Changed 6 years ago by HipHoppity

Well, we're up to VirtualBox version 3.2.10 now and the Numlock problem presents the same as it has since this ticket was opened. It makes working with VMs clunky -- any chance of fixing this in an upcoming version?

comment:12 Changed 18 months ago by frank

  • Status changed from new to closed
  • Resolution set to fixed
  • Description modified (diff)

Many changes for synchronization of NumLock, CapsLock, ScrollLock on OSX hosts recently. Try VBox 5.0.4. Closing.

comment:13 Changed 14 months ago by adam_sq213

  • Status changed from closed to reopened
  • Resolution fixed deleted

Reopened mistakenly under wrong OS

Last edited 14 months ago by adam_sq213 (previous) (diff)

comment:14 Changed 12 months ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use