VirtualBox

Ticket #2613 (new defect) — at Version 10

Opened 12 years ago

Last modified 5 years ago

Host key (ctrl) sometimes gets stuck down in Windows guest

Reported by: myxiplx Owned by:
Component: other Version: VirtualBox 2.0.4
Keywords: ctrl host key stuck Cc:
Guest type: Windows Host type: Linux

Description (last modified by michael) (diff)

Not all the time, but regularly enough to be a nuisance, the host key gets stuck down within the guest after it's been used to free up the mouse. Does VirtualBox always send the "key-up" message to the guest after the host key has been pressed?

I'm running VirtualBox full screen on my second monitor, and often hit ctrl so that I can leave the virtual machine running, but free the mouse so I can continue working on my primary screen.

After doing this, about a quarter of the time, I go back to the guest to find the control key stuck down. It means typing is impossible, and unlocking a machine with your password is a nuisance until you spot what is going on. Tapping the left control key on the keyboard does seem to free it up again.

I also run the VMware Infrastructure Client within this virtual machine, and that requires the use of Ctrl+Alt to free the mouse from its client windows. A couple of times now that has wound up locking the mouse and keyboard within VirtualBox when I come back to it, and it appears to coincide with times the control key has gotten stuck down. I'm reporting this here instead of as a separate bug as I think it's just another symptom of the same problem.

For now I've changed my host key to the Scroll Lock button, that appears to be a useful workaround for now.

Change History

comment:1 Changed 9 years ago by arencambre

I'm running into the same problem, 3 years later. :-) Has there been any progress on this?

comment:2 Changed 8 years ago by rrt

I have noticed the same problem with Alt getting stuck down in the guest after using Alt+Tab in seamless mode with keyboard capture switched off, so that the host always gets the keystroke.

Using Ubuntu 12.04 host, Windows 7 guest.

It can be cleared by pressing Alt again in the guest, but it makes seamless mode use unreliable.

comment:3 Changed 8 years ago by rrt

I can confirm the same problem in fullscreen mode (again with keyboard capture switched off).

comment:4 Changed 8 years ago by Bo

This has happened to me since about the 4.1.16 release. I run Ubuntu as my base system and use Windows 7 as the VM. Windows 7 behaves pretty well. The toggling from Windows back to Ubuntu is not as smooth as it used to be and the workspaces now behave oddly in 4.1.22. I wish at had stayed with the earlier variations of release 4. Still, a great product and thanks for the hard work.

comment:5 Changed 8 years ago by BJCubsFan

I have seen this problem using an Arch linux host and a Windows XP guest. The only way I could solve this was to pause and unpause the host machine. After that, the problem went away!

comment:6 Changed 8 years ago by Dtremblay

Same problem here. Host Windows 7 and Guest Windows XP. The key up message seems to get lost somewhere.

comment:7 Changed 8 years ago by rogerdpack

Dunno if it's the same problem, but with Windows 7 + Linux guest, sometimes when I "leave" the guest, the ctrl key for windows thinks it's down when it's not! (often enough to be annoying...) thanks! -r

comment:8 Changed 7 years ago by mosimu

This sounds like Sticky Keys. The following might help:

Open the Control Panel on Windows 7 host > Ease of Access > "Change how your keyboard works" > "Set up Sticky Keys"

Uncheck the option "Lock modifier keys when pressed twice in a row."

When your Ctrl or Alt key is stuck on the host, you should be able to unstick by holding down both Ctrl and Alt at the same time, then releasing. This works because of the other option you see in Control Panel, "Turn off Sticky Keys when two keys are pressed at once."

comment:9 Changed 7 years ago by rrt

It's not StickyKeys, at least in my case (I'm not even using a Windows host).

Last edited 7 years ago by rrt (previous) (diff)

comment:10 Changed 7 years ago by michael

  • Description modified (diff)

If it is not sticky keys on the host then you should be able to make it go away (I am not suggesting that this is a solution to the problem) using the command line command "VBoxManage controlvm keyboardputscancode <code>", where "code" is the hexadecimal scan code value (PS/2 scan code that is) of the key which is stuck. This page<1> has a list of hexadecimal scan codes for all standard keyboard keys.

<1>  http://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use