Configure a three-button mouse to work with MacOS X11 apps

Configure a three-button mouse to work with MacOS X11 apps

    from http://forums.macosxhints.com/showthread.php?t=8704&page=3

(Thanks to Greg Parker, Andrew Hartung, Michael, and Nick Zitzmann)

There are two ways to configure a real three-button mouse to work with X11.app and XDarwin:

  1. Enable X11's "mouse button emulation" and configure the mouse software to send option-click and control-click for buttons 2 and 3.
  2. Disable X11's "mouse button emulation" and configure the mouse software to send "middle click" and "right click" for buttons 2 and 3. This is the preferred configuration for a mouse with three physical buttons.
Make sure you have the most recent version of your mouse software.

For the ability to have different sets of mouse configurations on a per-application basis, the current versions of USB Overdrive and Kensington MouseWorks work great.

MouseWorks from Kensington, works great with X11, though you need one of their products.

USB Overdrive. It works fine with Logitech 3-button mouse, and it allows you to customize mouse configurations on a per-application basis. Tip: You can set up USB Overdrive so the "clicked wheel" actions are turned off and the scroll wheel works as the middle mouse button just for X11.app, and it works fine. http://www.usboverdrive.com/

Is there any way to enable the scroll-wheel?

XDarwin looks for standard Cocoa scroll wheel events and turns them into X11 buttons 4 and 5. (not sure what X11.app does.) Some X11 apps like xterm understand this out of the box, but other X11 apps might need to be configured to recognize buttons 4 and 5 as scroll wheel motion. Use the xev program to check whether your X11 server is actually generating any X11 events when you move the wheel.

Tip for Logitech Wheel Mouse Optical:

Logitech Control Center configuration for the "Wheel Button" should be set to "Advanced Click" with the "Configure Advanced Click" tab settings "Click Type" = Click and "Button number" = 3.