VirtualBox

Opened 14 years ago

Closed 13 years ago

#7000 closed defect (fixed)

Keys are always captured regardless of GUI icon -> clarified in documentation as of 7 Jun 2011 (not in version 4.0)

Reported by: andys Owned by:
Component: other Version: VirtualBox 3.2.0
Keywords: Cc:
Guest type: Windows Host type: Windows

Description

Win7x64 host, WinXPSP3 guest.
When I press host key inside guest it does this -

  1. correctly returns mouse pointer outside,
  2. key input icon in gui status bar becomes grey,

But -
3.a. most keys are still send inside the guest (most simple keys - letters, numbers etc). Tested with notepad.
3.b. some are duplicated in host - when I press Win key I get start menu popup in both guest and host
3.c. some are left in guest only (microsoft keyboard's volume +/- keys)
Changing keyboard auto-capture and integrated mouse settings didn't help.
Guest additions are installed in guest machine.

Attachments (2)

VBox.log (48.0 KB ) - added by andys 14 years ago.
VBox.log.1 (70.5 KB ) - added by andys 14 years ago.
more recent log, still the same behavior

Download all attachments as: .zip

Change History (12)

by andys, 14 years ago

Attachment: VBox.log added

by andys, 14 years ago

Attachment: VBox.log.1 added

more recent log, still the same behavior

comment:1 by Frank Mehnert, 14 years ago

I don't think that this is a bug. Keyboard grabbed actually means that the guest tries to catch every keypress which is done when the Window is selected. In that mode, almost every key is passed to the guest and not to the host. Exception: The host OS prevents some keys to go to the guest (for example Ctrl+Alt+Del on a Windows host).

If the guest does not grab the keyboard (keyboard icon gray) and the Window is still selected, many key presses go still to the guest but some others (for example Alt-TAB) will be passed back to the host.

comment:2 by andys, 14 years ago

Quoting: If the guest does not grab the keyboard (keyboard icon gray) and the Window is still selected, many key presses go still to the guest

Stretching to extreme - it's like some program tells me that it won't format my C: but still formats it. Icon should indicate that guest IS or IS NOT grabbing keyboard. There should not be any gray zone here, only ON or OFF.

comment:3 by Michael Thayer, 14 years ago

Perhaps the problem here is our use of the word "grab", which is technically correct (in a windowing context it means to monopolise the keyboard and not let other applications access it) but possibly not what you thought. Other than the fact that you didn't expect it, does the current behaviour inconvenience you in any particular way?

comment:4 by Sander van Leeuwen, 14 years ago

When the VM window has focus it behaves as any other application in the system: 'normal' keys go to the application and system keys do not. I find VMWare's keyboard handling (where you always have to click inside the guest window first) rather annoying. Not a bug.

comment:5 by Frank Mehnert, 14 years ago

Resolution: wontfix
Status: newclosed

in reply to:  5 comment:6 by andys, 14 years ago

Resolution: wontfix
Status: closedreopened

Replying to frank: Any comments regarding DUPLICATE keys before closing? Host or guest, but any key should work in one of them at a time.

comment:7 by Michael Thayer, 14 years ago

When an application has not capture the keyboard (any application can do this, not just VirtualBox) other applications can snoop on keypresses. So for example, although VirtualBox sees the Windows key when the keyboard is not captured, the host menu can see it too and reacts to it. This is part of the design of Windows (and X11 for that matter), and not a feature or mis-feature of VirtualBox. Since you have to manually uncapture the keyboard for this to take effect, I don't understand why it is such an issue for you. If you press the Windows key while any other application has the focus, that application will get the keypress too, as well as the host menu. But most applications won't react to it. VirtualBox, for obvious reasons, will react to it if the guest wishes to.

Was that explanation satisfactory?

comment:8 by Michael Thayer, 14 years ago

Actually I will correct that slightly - X11 lets applications take ownership of key combinations, and the application with the focus won't even see the combination from that point. I don't know as much about Windows, but is looks from your description as though it doesn't do that.

comment:9 by Frank Mehnert, 14 years ago

Even Windows will not forward every key action to the application, for instance no Windows application will ever see Ctrl+Alt+Del AFAIR. But this has nothing to do with the duplicate keys issue.

comment:10 by Michael Thayer, 13 years ago

Resolution: fixed
Status: reopenedclosed
Summary: Keys are always captured regardless of GUI iconKeys are always captured regardless of GUI icon -> clarified in documentation as of 7 Jun 2011 (not in version 4.0)

I updated the descriptive text for the "auto-capture keyboard" option with some of the information from comment 7.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use