VirtualBox

Ticket #10428 (new enhancement)

Opened 7 years ago

Last modified 6 months ago

Need middle button simulation on MacBook Pro

Reported by: wfiveash Owned by:
Priority: major Component: other
Version: VirtualBox 4.1.12 Keywords:
Cc: Guest type: Solaris
Host type: Mac OS X

Description

The native X11 that comes with OS X will treat the combination of the option key + left trackpad click as a middle button press and command key + trackpad click as a right button press event. It would be nice if Virtual Box supported this as this would make my life a bit easier when working in a Solaris 11 guest session on my MacBook Pro OS X host.

Change History

comment:1 Changed 6 years ago by wfiveash

Any thoughts?

comment:2 follow-up: ↓ 4 Changed 6 months ago by mcandre

Same problem. I am unable to save documents with the Acme text editor in Plan 9 in VirtualBox on macOS hosts, as this requires the use of a middle mouse button.

I tried pressing Option + Left click on the trackpad, no luck.

I tried attaching attaching an external mouse and pressing Left and Right click simultaneously, no luck.

comment:3 Changed 6 months ago by mcandre

As a workaround, I am able to successfully send a middle click to VirtualBox guests from macOS hosts, by setting up a third party app to emulate middle click from the host:

  1. Install MiddleClick from  https://rouge41.com/labs/
  2. Disable the Look up gesture in Trackpad settings
  3. Depress three fingers on the trackpad to create a middle mouse click.

This shows that macOS is capable of generating middle mouse click events, it's just that VirtualBox does not by default create any useful mapping, such as Left Option + Click, to allow users to middle click from a basic macOS environment.

comment:4 in reply to: ↑ 2 Changed 6 months ago by socratis

Replying to mcandre:

I tried attaching attaching an external mouse and pressing Left and Right click simultaneously, no luck.

Whatever program you use, it must be setup to understand that simultaneous left+right=middle, it doesn't happen automagically.

You need to get a better mouse, a mouse that has an actual middle-click mechanism (3 or more buttons). When you get one, try  http://www.javascripter.net/faq/leftvsrightmousebutton.htm for a test. Mine works just fine..

This shows that macOS is capable of generating middle mouse click events, it's just that VirtualBox does not by default create any useful mapping, such as Left Option + Click, to allow users to middle click from a basic macOS environment.

No, you got it wrong. It's OSX that doesn't map anything to middle click, because it's rarely (if ever) used in OSX:

  • If a middle-click event is received by VirtualBox, a middle-click event will be sent to the guest, like if you have a 3-button mouse.
  • If a middle-click event is not received by VirtualBox, a middle-click event will never reach any guest.

Your "solution" seems to be the suggested one from a quick internet search, and it seems to address the shortcomings of OSX.

It should be up to the end user to decide if middle-click is important for their environment. I do not want VirtualBox to take such liberties with any mappings, at least not if it's not set as the non-default, configurable option. How do you know that I don't already use LeftOpt+Click for something else legitimate?

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use