Various SHIFT keys stuck after switching to host

Discussions related to using VirtualBox on Windows hosts.
danf84
Posts: 77
Joined: 16. Jul 2009, 18:15
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP

Various SHIFT keys stuck after switching to host

Post by danf84 »

Hello,
Basically, after using the Guest, you return to the host (whether by moving the mouse cursor out of the guest or by pressing the HOST KEY), you start typing something on the host, e.g. a document or a URL in a web browser, you get random behavior because one of the shift keys/modifiers is considered as PRESSED DOWN by the operating system. It's a very annoying bug that has existed for years.

To give you an example, you start typing, you press F, Windows Search comes up, you press E, Windows Explorer comes up etc. On Windows 7, at the log on screen, if certain keys are stuck, I have the Accessibility window pops up, and then the narrator starts reading the screen. If you hit X and the WIN button is stuck, you get the Windows Mobility Center program come up; you get the gist - depending on what's stuck, a different hot key is activated. It really is not good for my productivity as it's distracting, frustrating and unpredictable. To immediately work around it is easy, you just quickly press each shift key on your keyboard, but sometimes, you have to do it more than once to "unlock" the stuck key. The real issue is you don't know it's about to happen, so you start typing, many windows open, also, these shift keys might be hot keys that do something in the software you're currently using; you can end up with data loss. I can't begin to list all various things happen to me. One time, the other day, I had all my windows resize to the same size; I am not even sure some of those windows were sizable (hell, I think I may have discovered a secret weird hot key in Windows 7).

This happens. in XP 32bit and Windows 7 64bit.

I think this needs to be addressed now. Can enough people confirm the problem because it can't possibly be just me!

SORT IT OUT: it's ridiculous bug which makes me swear and scream at this point when it happens and VirtualBox gets cursed, and it's a great product that is marred by stupid little issues like that.
Last edited by danf84 on 7. Sep 2011, 15:44, edited 1 time in total.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Various SHIFT keys stuck after switching to host

Post by Perryg »

I don't see this issue and never have. So it must be something that is Dependant on your setup. How about a log file or something that will point out the issue?
Leak
Posts: 242
Joined: 31. Mar 2009, 13:00
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian Testing, Windows XP, Windows Server 2003/2008 R2

Re: Various SHIFT keys stuck after switching to host

Post by Leak »

Perryg wrote:I don't see this issue and never have. So it must be something that is Dependant on your setup. How about a log file or something that will point out the issue?
I can easily replicate this by hitting Windows+L to lock the host while I'm working in a VM - it'll lock the VM (if you're running Windows in it) and a split second later the host kicks in and locks itself, and if you try to type your password you'll find that the host thinks that the Windows key you used to lock the machine is still being held down.

For instance (I think) pressing U will bring up the irritating Accessibility window - you have to press and release the Windows key again to be able to enter your password to unlock the host.
danf84
Posts: 77
Joined: 16. Jul 2009, 18:15
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP

Re: Various SHIFT keys stuck after switching to host

Post by danf84 »

Perryg, I had this happen on desktop and laptop (both Dell though).

I have however did a quick search on "stuck keys" and "alt shift win", and it appears many users are having this problem. You actually replied to someone with this exact problem.

http://forums.virtualbox.org/viewtopic. ... ys#p165740
http://forums.virtualbox.org/viewtopic. ... ys#p163370
http://forums.virtualbox.org/viewtopic. ... ys#p157061
http://forums.virtualbox.org/viewtopic. ... ys#p137131
http://forums.virtualbox.org/viewtopic. ... eys#p45035

Dan

EDIT:

http://forums.virtualbox.org/viewtopic.php?f=6&t=29957
http://forums.virtualbox.org/viewtopic. ... rl#p146412

According to the bug ticket http://www.virtualbox.org/ticket/2537 (opened 3 years ago) this was reported in version 2!

There's more to the problem and it's possibly related. Stuck keys go from Host to Guest - like in my Delphi code editor, if I use the mouse scroll wheel, it scrolls by pages, and I have to go through the routine of pressing each modifier key to reset it.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Various SHIFT keys stuck after switching to host

Post by Perryg »

I didn't say you did not have an issue I said I have not seen this behavior in any machine I have used (I don't see the issue)
I understand that you and a few others have this problem but since it is not reproducible it makes it hard to determine what the issue could actually be.
I asked for a guests log file in an attempt to help isolate your issue if I can. Are you willing to provide it?
You also state that you have had this happen in at least two different units. Does this happen with specific programs or apps?
Is it possible that there are (guest) keyboard apps/shortcuts defined differently than what the guest uses by default?
Do the guests have the guest additions installed and do they match the version of VirtualBox you are using?
danf84
Posts: 77
Joined: 16. Jul 2009, 18:15
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP

Re: Various SHIFT keys stuck after switching to host

Post by danf84 »

> I understand that you and a few others have this problem but since it is not reproducible it makes it hard to determine what the issue could actually be.
I think the issue has been ignored as I am sure it happens to people who write this stuff who deem this as unimportant.
> I asked for a guests log file in an attempt to help isolate your issue if I can. Are you willing to provide it?
The log file won't help since it doesn't show how each key stroke is handled and the conditions that determine to which window (guest or host) to send the keys).
> You also state that you have had this happen in at least two different units. Does this happen with specific programs or apps?
No, just general use, for 3 years.
> Is it possible that there are (guest) keyboard apps/shortcuts defined differently than what the guest uses by default?
No.
> Do the guests have the guest additions installed and do they match the version of VirtualBox you are using?
Yes.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Various SHIFT keys stuck after switching to host

Post by Perryg »

OK.
danf84
Posts: 77
Joined: 16. Jul 2009, 18:15
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP

Re: Various SHIFT keys stuck after switching to host

Post by danf84 »

I've managed to consistently reproduce a couple of similar symptoms:

This is related but not strictly producing the effects I was describing with modified keys being stuck, but try this:
Inside the guest, hit the HOST KEY. Then hit the WIN key (I'm running XP). Host's Start menu should open. Now hit the WIN key again, that should close the host's Start Menu. The guest however, for some reason, shows the Start Menu.
You can see this better by aligning the task bar in your guest/host to a different place, then you see that hitting WIN key opens both Start Menus. Following the trail in this bug might lead to the rest of it.

Now, here's another scenario but it's worse:

Inside the Guest, hit the HOST KEY, then hit WIN key 3 times, then hit WIN + L: now one of your modifiers key is stuck (probably the WIN key).

Also, why is it you can't do WIN + L in the Guest without locking the host as well?


Can someone else try and reproduce it?
wes
Posts: 2
Joined: 6. Jan 2012, 00:24
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Arch Linux

Re: Various SHIFT keys stuck after switching to host

Post by wes »

I have the same problem. Just about any key can get stuck for me- not just the modifiers. In fact, I just now lost several minutes of my life trying to search for "virtualbox forum" due to my 'v' key not working. My setup is a little different: windows 7 host, but arch linux guest. As such, I cannot reproduce the problem via your steps exactly, but I can confirm that this is an issue. I will do some more experimentation, but here are a few things that I feel are the most reproducible:

1) Inside guest, hit the host key (for me this is scroll lock, although I doubt it matters) and then alt-tab to a window in the host, say firefox. Somehow, the *window* key is stuck until I press it again in the host. I can go back to the guest and hit the window key over and over, but nevertheless, when I leave it will again be stuck in the host- *provided that I leave via alt-tab*. If I just click on another window in the host, all is well. Unfortunately, I'm not a big mouse-user.

2) Let the (host) screen saver come on with the VM focused. Kill the screen saver by hitting the Ctrl key. The Ctrl key is now stuck in the host.

A few other notes:
* I am using a minimal KDE installation as my desktop environment, however I had problems from the start, with a brand new VM and a bare-bones arch linux setup- no desktop environment; just a tty.
* Things are going wrong *all the time*, but I usually can't put my finger on the cause.

*EDIT*
Update: I just now used the mouse to go from guest to host, and still had the windows key stuck. It is not just alt-tabbing that causes the problem.
wes
Posts: 2
Joined: 6. Jan 2012, 00:24
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Arch Linux

Re: Various SHIFT keys stuck after switching to host

Post by wes »

I thought I'd share one more bit of insanity that will hopefully help someone figure this out.

When some of my normal (non-modifier) keys are stuck (which happened about 15-20 times today) I noticed additional strangeness:

1) Not all programs fail to respond to the keystrokes: I've noticed that most of windows 7, including the windows search box will not recognize the key presses, nor will gvim, yet notepad (yes, notepad!) consistently WILL RESPOND. (o.O)
2) It seems that *lower case* keys were stuck, but not upper case: I could press 'h' and get nothing, but Shift+h would produce a capital H in the windows search box. Again, notepad worked regardless, but the windows search box (and gvim, and others) would not respond.
3) It does NOT seem to depend on the keyboard. I ran the on screen keyboard (osk.exe) and had the same results as with my usb keyboard.

The way it is behaving, it seems like maybe there is a modifier key stuck after all, but I can't figure out which one- it seems that the same keys are usually getting stuck- among the most common for today were the h,v,c keys.

Could someone please have a look into this problem? I'm more than happy to help, and I think this desperately needs a fix. This renders an otherwise great product pretty much useless. Thanks!
danf84
Posts: 77
Joined: 16. Jul 2009, 18:15
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP

Re: Various SHIFT keys stuck after switching to host

Post by danf84 »

Shocking that this still hasn't been fixed. VirtualBox is failing so badly with silly issues like this. I've not used it for a while, and now after 6 months I've had it crash twice (some dialog was open while the guest was shutting down; cannot reproduce; lovely), but more to the point, this issue with keys getting stuck still hasn't been fixed. It's embarrassing because while everything else is working (aside from the occassional crash), this daily problem is preventing me from recommending it to my employer. This issue is a pathetic shame to the product...it's frustrating. Shame on Oracle for not having attended to it.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Various SHIFT keys stuck after switching to host

Post by mpack »

danf84 wrote:Shocking that this still hasn't been fixed. VirtualBox is failing so badly with silly issues like this
You have a problem that the host is missing interrupts. How do you imagine that is VirtualBox's fault? Do you believe there is any legitimate scenario in which an user application can control which interrupts a host OS services, and which it doesn't?

The problem is a result of stressing the host, it can happen with any software.
danf84
Posts: 77
Joined: 16. Jul 2009, 18:15
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP

Re: Various SHIFT keys stuck after switching to host

Post by danf84 »

I am on a really un-stressed quad core i7 machine with 8GB of RAM. Read around - this is reproduceable in 2 seconds without any stress to the host (along the lines of WIN + L). To further counter your argument that this could happen to any software: never had this problem with VMware.
danf84
Posts: 77
Joined: 16. Jul 2009, 18:15
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP

Re: Various SHIFT keys stuck after switching to host

Post by danf84 »

mpack read up in THIS thread: I posted instructions (IIRC others too) about how to reproduce this without any unreasonable usage.
danf84
Posts: 77
Joined: 16. Jul 2009, 18:15
Primary OS: MS Windows XP
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP

Re: Various SHIFT keys stuck after switching to host

Post by danf84 »

I managed to reproduce the aforementioned crash surrounding modal windows during guest shutdown; https://www.virtualbox.org/ticket/10770
Post Reply