VirtualBox

Ticket #1066 (new enhancement)

Opened 6 years ago

Last modified 6 years ago

Improved automatic keyboard and mouse capture

Reported by: hashstat Owned by:
Priority: minor Component: GUI
Version: VirtualBox 1.5.4 Keywords:
Cc: Guest type: other
Host type: other

Description

Currently, vbox captures the keyboard when a vbox guest window is active and ignores the keyboard when a vbox guest is not the active window. VMWare automatically captures the keyboard when the mouse enters the guest display area regardless of whether the window is active or not and releases it when the mouse leaves the guest display area. The VMWare behavior allows for better integration of the virtual machine into the host environment and would be nice to have in vbox.

It would also be nice to capture all keyboard input when the guest has captured the keyboard so that special combinations, such as Ctrl+Alt+F1, don't need a special host key combination to work. This is especially important in fullscreen mode where only the host+Home or host+F combination should be passed to the host (IMHO).

Change History

comment:1 follow-ups: ↓ 2 ↓ 3 Changed 6 years ago by michael

Regarding the first point - I hate to give such a boring answer, but actually what VMWare does is to force focus-follows-mouse on the user. At least in Linux/X11, this is something which the window manager/desktop environment is in charge of, and you can configure it there. It is considered "bad behaviour" when an application tries to override the window manager on this sort of thing, and might make other people unhappy.

Regarding the second, I didn't know that it was possible for applications to capture Ctrl-Alt-F1 under X.Org if the window system is using them. Does VMWare really succeed in doing this?

comment:2 in reply to: ↑ 1 Changed 6 years ago by hashstat

Replying to michael:

Regarding the second, I didn't know that it was possible for applications to capture Ctrl-Alt-F1 under X.Org if the window system is using them. Does VMWare really succeed in doing this?

I'm fairly certain that in fullscreen mode VMWare captures almost all keystrokes, including Ctrl+Alt+<key>. I will have to fire up VMWare and check. It's been sitting dormant since I started using VirtualBox because I've been so impressed with vbox.

comment:3 in reply to: ↑ 1 Changed 6 years ago by hashstat

Replying to michael:

I just fired up my Windows XP and Feisty VMWare guests to verify my statements.

Regarding the first point - I hate to give such a boring answer, but actually what VMWare does is to force focus-follows-mouse on the user.

This doesn't appear to be the case. With focus-follows-mouse, the window is activated and brought to the top when the mouse cursor enters the window and focus is lost when the cursor leaves the window. With VMWare, the keyboard and mouse are not captured when the cursor enters the VMWare window, but when the cursor enters the guest area within the VMWare window (without activating the VMWare window). So if I have Firefox open over VMWare and I move the mouse cursor over the VMWare toolbar and press Alt+2, the tabs are switched in Firefox, not in VMWare. Then if I move the cursor over the guest area in the VMWare window and press a key, it is sent to the guest. All of this is done without changing the active window. This issue, however, isn't that important.

Regarding the second, I didn't know that it was possible for applications to capture Ctrl-Alt-F1 under X.Org if the window system is using them. Does VMWare really succeed in doing this?

VMWare DOES capture all key combinations. I am able to switch between virtual terminals in my Feisty VM using Ctrl+Alt+<Fn> keys and Ctrl+Alt+Backspace restarts X on the guest. Ctrl+Alt+Delete in the Windows XP guest brings up the task manager. This works in both fullscreen and windowed mode. I'm not sure how they are accomplishing this, but every key combination gets captured when the mouse cursor is over the guest area. Could it be that they are using a loadable kernel module to capture these combinations?

comment:4 Changed 6 years ago by frank

  • Component changed from other to GUI
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use