Host Key + mouse click

Here you can provide suggestions on how to improve the product, website, etc.

Host Key + mouse click

Postby OkieDan » 23. Jul 2021, 05:32

I spent about an hour today tracking down why CTRL+ALT+L-Click wasn't working in a program running in my VM (Visual Studio 2019 - Go To Definition mapped with CTRL+ALT+L-Click). It ended up being caused by CTRL + ALT being mapped as my Host Key.

Please consider passing modifier keys that are currently being pressed in host to the guest OS when the user clicks mouse, even if said modifier key combination is the Host Key combination.

Since VirtualBox Keyboard Settings doesn't allow you to map a mouse click to a shortcut, it shouldn't be a breaking change.
OkieDan
 
Posts: 7
Joined: 13. Aug 2019, 20:47

Re: Host Key + mouse click

Postby mpack » 23. Jul 2021, 09:41

I don't see how that would be possible. It implies that keyboard and mouse interfere with each other, when in fact these are unrelated input devices.
mpack
Site Moderator
 
Posts: 34540
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Host Key + mouse click

Postby scottgus1 » 23. Jul 2021, 14:58

OkieDan wrote:passing modifier keys that are currently being pressed ... even if said modifier key combination is the Host Key combination.

The Host Key combination all by itself is a Virtualbox command, being the way one releases the mouse and keyboard from a VM when Mouse Integration is not enabled, such as for DOS VMs . So passing the Host-Key-Only combination to the VM removes this basic command from host operation and can leave folks marooned in their VMs.

It may be more practical to set your Host key to a combination that does not come up often in your workflow. Ctrl + Alt is somewhat common. Host key combos may not be used as often, especially when Guest Additions are installed and Mouse Integration is enabled.

What about Shift-Ctrl-Alt? Or if you find yourself Ctrl-Alt-ing with your left hand, set Host Key to Right Ctrl-Right Alt?
scottgus1
Site Moderator
 
Posts: 12987
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Host Key + mouse click

Postby OkieDan » 24. Jul 2021, 23:33

scottgus1 wrote:
OkieDan wrote:passing modifier keys that are currently being pressed ... even if said modifier key combination is the Host Key combination.

The Host Key combination all by itself is a Virtualbox command, being the way one releases the mouse and keyboard from a VM when Mouse Integration is not enabled, such as for DOS VMs . So passing the Host-Key-Only combination to the VM removes this basic command from host operation and can leave folks marooned in their VMs.

It may be more practical to set your Host key to a combination that does not come up often in your workflow. Ctrl + Alt is somewhat common. Host key combos may not be used as often, especially when Guest Additions are installed and Mouse Integration is enabled.

What about Shift-Ctrl-Alt? Or if you find yourself Ctrl-Alt-ing with your left hand, set Host Key to Right Ctrl-Right Alt?



That is my solution currently. However, is it possible to let the guest know that CTRL and ALT are down before releasing mouse and keyboard back to the host, and leaving the guest in a state that it believes CTRL+ALT being held down constantly until you give the guest control of them again, typically by clicking into guest window and hopefully having the guest interpret that mouse click along with the modifier keys? So let's say you have the On Screen Keyboard up in windows guest. If you press CTRL+ALT then the OSK will show CTRL+ALT as pressed even though keyboard and mouse have been released back to the host.
OkieDan
 
Posts: 7
Joined: 13. Aug 2019, 20:47

Re: Host Key + mouse click

Postby scottgus1 » 24. Jul 2021, 23:49

I'm quite sure such a process could be programmed if the process could get around the whole mouse-vs-keyboard dilemma that Mpack pointed out. Then you'd just have to convince the developers. Post an enhancement on the Bugtracker.

Meanwhile, change the Host Key Combo. The devs would take some time to implement it, if they liked it, so it wouldn't be in the next few versions, if it ever gets off the ground.

It will take some convincing, though, to make the devs think that changing a long-standing everyone-knows-how-it-works process like the Host-Key-Only release from the VM is a good idea, when an easy workaround of not using a common key set for the Host Key Combo is available.
scottgus1
Site Moderator
 
Posts: 12987
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Host Key + mouse click

Postby OkieDan » 25. Jul 2021, 00:38

Thanks, I thought this "Suggestions" forum was to submit suggestions for Virtualbox not suggestions for the forum. I created a ticket. https://www.virtualbox.org/ticket/20476
OkieDan
 
Posts: 7
Joined: 13. Aug 2019, 20:47

Re: Host Key + mouse click

Postby scottgus1 » 25. Jul 2021, 03:00

OkieDan wrote:I thought this "Suggestions" forum was to submit suggestions for Virtualbox not suggestions for the forum.

It can be for both. Enhancement ideas for Virtualbox can be fleshed out and probed here, and the place to post the final idea is on the Bugtracker.

Forum ideas can be discussed here too.
scottgus1
Site Moderator
 
Posts: 12987
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 6 guests