Shift stuck in guest when both shifts are pressed (#17709)

This is for discussing general topics about how to use VirtualBox.
chronzerg
Posts: 4
Joined: 16. Aug 2016, 00:52

Shift stuck in guest when both shifts are pressed (#17709)

Post by chronzerg »


[ModEdit; related ticket: #17709: VirtualBox-5.2-5.2.10_122088 Keyboard problems]
Please try the Development Builds first, there is a fix in the works.

Good morning (from where I am),

I noticed a bug recently on my VM that is reproducible every time. While in the guest VM, if both shifts are held down together their keyup seems to never be registered. Therefore every key press after that has the shift modifier turned on. Pressing the shift one at a time after that resolves the issue. This is very annoying when typing in all uppercase using the shift key as I will sometimes press the right shift before having released the left shift and vise versa. I don't use capslock because it usually causes more errors in my typing than I think it's worth. Has anyone here experienced this problem? Does anyone have a solution?

Host: Windows 7
Guest: CentOS 7
Last edited by socratis on 13. Jun 2018, 08:12, edited 2 times in total.
Reason: Added ticket related information.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Shift stuck in guest when both shifts are pressed

Post by socratis »

That's the first I've heard of something similar. You have another post about keyboard issues. You never replied to that, but since you're the only one reporting long time working features, is there anything weird in your host/guest with their keyboard layouts/preferences?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
chronzerg
Posts: 4
Joined: 16. Aug 2016, 00:52

Re: Shift stuck in guest when both shifts are pressed

Post by chronzerg »

The only keyboard setting I changed was to uncheck the "Auto Capture Keyboard" checkbox. The reason I unchecked this box is because it allows me to alt+tab out of my virtual machine, it does take two alt+tabs to do so as stated in my other post. With this box checked, alt+tab doesn't change applications on my host.
hossdave
Posts: 2
Joined: 7. Feb 2018, 01:12

Re: Shift stuck in guest when both shifts are pressed

Post by hossdave »

I too had this problem and it drove me crazy forever. I was about to buy a new keyboard and then this happened when I was on travel with a different keyboard and realized it was my VM, not my keyboard.

I have Windows 10 for Host OS and CentOS 7 as my guest OS and also had my "auto-capture keyboard" setting not selected in the keyboard settings. Once I saw this post, I realized that it was the simultaneous left/right shift key selection that was causing the stuck shift key problem. Once I knew this, it was pretty easy to try changing a few options to see if I could resolve the problem.

When the problem happens, I have to double tap both shift keys to get it to reset and work normally. This I've learned over time, but I did not know the cause until now.

I normally have the mouse integration option turned off in VirtualBox (input->Mouse Integration), but when I turn this on, the problem goes away. However, I hate this option because my mouse gets confined to the guest OS. I also noticed if I check the option of "auto-capture keyboard" in input->Keyboard->Keyboard Settings ... menu, the problem goes away. I had not selected this option because I thought it would isolate the keyboard to the Guest OS, but I was wrong. I am still able to type in both guest/host OS without issue.

Its going to be so nice to have this fixed.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Shift stuck in guest when both shifts are pressed

Post by socratis »

hossdave wrote:Its going to be so nice to have this fixed.
As long as it can be reproduced, that is...
If it can't be reproduced, it can't be addressed.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
HDVCoder
Posts: 3
Joined: 16. May 2018, 00:31

Re: Shift stuck in guest when both shifts are pressed

Post by HDVCoder »

VB: 5.2.10 r122088
Host: Fedora 26
Guest: Windows 7

I'm seeing similar Shift related problems after upgrading from 5.1 to 5.2.10 on my Fedora box.

At first, the shift key would get stuck at random times. Turning on the Windows graphical keyboard sometimes would show the shift key highlighted as though it were pressed. Pressing Shift would then turn OFF shift behavior until the key was released.

I thought this thread was interesting talking about pressing both Shift keys at the same time. I find that when I do that, I can undo this problematic stuck Shift key.

I've only just been able to begin reliably reproducing the stuck Shift problem. This Shift becomes eventually stuck apparently as the result of the keyboard buffer becoming full when using the arrow keys to scroll a text window on the guest.

For example, in a Vim text editing buffer within the guest, if I hold the arrow keys long enough, the scroll cannot keep up with the keyboard and presumably the keyboard buffer begins to fill. At that point, suddenly the Shift key is triggered. In Vim, this is noticeable because subsequent Up/Down arrow key presses advance whole screens rather than one line at a time as they would with no Shift.

I can trigger the same behavior by holding down the Up arrow within a CMD window.

Pressing both left and right Shift keys at the same time appears to reset the system and disable the erroneous stuck Shift. Pressing only the left or the right Shift simply toggles the state and does not undo the stuck Shift.

The problem appears to occur whether I have the Windows 7 Filter keys feature turned on or off (Ease of Access Center -> Make the keyboard easier to use -> Turn on Filter keys). I might try adjusting the repeat/slow keyboard repeat rates to see if I can improve the filtering and prevent this from happening. If I can get it to work, I'll post back here.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Shift stuck in guest when both shifts are pressed

Post by socratis »

HDVCoder wrote:if I hold the arrow keys long enough, the scroll cannot keep up with the keyboard and presumably the keyboard buffer begins to fill
HDVCoder wrote:he problem appears to occur whether I have the Windows 7 Filter keys feature turned on or off
Both of these are really nice findings! Let's see if the developers can figure something out from that.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Guyver
Posts: 104
Joined: 11. Feb 2012, 06:19
Primary OS: Solaris
VBox Version: PUEL
Guest OSses: Windows 7
Location: Central United States

Re: Shift stuck in guest when both shifts are pressed

Post by Guyver »

Good to know that I'm not the only one with "shift" related issues now.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Shift stuck in guest when both shifts are pressed

Post by socratis »

@HDVCoder
Maybe you have a "flooded" keyboard buffer as well? Maybe the repeat rate is too fast? See Guyver's thread for more info...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
HDVCoder
Posts: 3
Joined: 16. May 2018, 00:31

Re: Shift stuck in guest when both shifts are pressed

Post by HDVCoder »

I suppose it's possible, but doubtful. I've never messed around with keyboard rates when running the virtual windows guest on my Fedora desktop.

I've only noticed the problem with the 5.1.10 update. It's possible that Fedora slipped a keyboard update or something in during the same system update that brought down the Virtualbox update. So I can't rule out that this is a Fedora problem.

I wasn't able to "fix" things by fiddling around with the windows host keyboard settings. I'm currently testing out the update to 5.1.12 to see if that helps. I also followed the suggestion in that linked thread to switch my keyboard driver to usb from the standard ps/2. We'll see how it goes.
Last edited by socratis on 18. May 2018, 00:35, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Shift stuck in guest when both shifts are pressed

Post by socratis »

HDVCoder wrote:I've only noticed the problem with the 5.1.10 update.
From the 5.2.10 (that's what you meant I think) changelog:
• Keyboard: introduced a small delay to fix old software which expects to be able to read an incoming scan code more than once (bug #17592)
But in there, "michaln" insists that this is a TurboPascal only issue (and I believe him ;) ). There is another ticket mentioned, #17709 in which "michaln" again asks for more data. Maybe you should take a look? And provide the appropriate information?

I'll post to the ticket, mentioning both the threads that deal with this. Maybe you should continue the discussion by providing the necessary info that michaln is asking for...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
HDVCoder
Posts: 3
Joined: 16. May 2018, 00:31

Re: Shift stuck in guest when both shifts are pressed

Post by HDVCoder »

Yes, I meant 5.2.10.
So far, after switching the keyboard to usb from the default ps/2 AND updating to 5.2.12, I have not encountered the problem again. And I was running into it quite often as I would use the arrow keys to scroll through my code. Let's hope the 5.2.12 update was the fix.
Last edited by socratis on 23. May 2018, 09:09, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
passt2
Posts: 5
Joined: 29. Jul 2013, 08:56

WinXP guest and shift key locked

Post by passt2 »

Hi everybody,
since I've migrated my host from Ubuntu 17.10 to 18.04 the virtualbox's guest winxp often locks the shift key so that any pressed keys or even mouse clicks are misinterpreted and doesn't work anymore. I have to reboot the guest winxp so that the shift key is released and everything works fine. Until the next time the shift key is locked suddenly.

Can anybody help?

Peter
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Shift stuck in guest when both shifts are pressed

Post by socratis »

@passt2
I've merged your topic with an existing one, because I believe it's the same underlying issue. And since this issue seems to have no preference for host *or* guest kind, I don't think it belongs to "Windows Hosts" or "Windows Guests". Moving the whole thread to "Using VirtualBox".

@ALL
In case you missed it, "michaln" asked in ticket #17709 that you try the Development Snapshots (at the bottom of the page, *not* the Test builds). Can you give it a try and report back to the ticket?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
heis2201
Posts: 8
Joined: 6. Jul 2017, 17:00

Re: Shift stuck in guest when both shifts are pressed

Post by heis2201 »

I do have the same problem with a Win7 and a Win 8.1 guest on a VirtualBox Fedora Linux host.
Post Reply