VirtualBox

Opened 13 years ago

Closed 8 years ago

#9937 closed defect (obsolete)

resuming a VM saved via keyboard causes keys to not be seen

Reported by: jayfinger Owned by:
Component: other Version: VirtualBox 4.1.6
Keywords: keyboard modifiers save resume Cc:
Guest type: Linux Host type: Mac OS X

Description (last modified by aeichner)

I use Command-Q to Save my guest and stop VB. Actually, I have re-bound Command-Q to be Control-Option-Command-Q, since I want the Command-Q binding to go to my VM. The rebinding of the menu option was done with the Mac's "defaults" command.

That part works... I hit Control-Option-Command-Q, VB asks me if I want to Save, Shutdown, or Power Off. I save.

Some time later I restore. The keyboard does not work at that point. Or depending on which window has focus, it might do unexpected things. What fixes it, is I press and release each of the modifier keys.

I am guessing that what is happening is that the saved VM things I'm still holding down Control-Option-Command, from when I used the keyboard to Save & Quit from VB before. When restoring the guest it has missed the key-up events, and thinks I'm still holding them down. Probably the restore operation needs to do a little keyboard dance with the guest so that the guest sees the correct state of the modifiers when the guest is resumed.

Since I have figured out what is going on this is minor. But it could be a real problem for somebody that doesn't get it. I'm submitting with a priority of "Minor" anyhow.

My guest at the moment is CentOS 6.0 x86_64, and I have the 4.1.6 extensions and guest additions installed.

Change History (2)

comment:1 by mindshoot, 13 years ago

Just to say that I was about to report the same problem: I eventually realised what must have caused it, but it can be rather serious when you first resume a virtual machine. In particular, if you resume and then type into a shell, editor or whatever, you are likely to very quickly press a number of keys, each of which can do something drastic.

I assume the fix is probably nothing more than reading the modifier key state when resuming a machine, and passing them through as keystrokes if necessary.

comment:2 by aeichner, 8 years ago

Description: modified (diff)
Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette