Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Ubuntu on Parallels on a MacBook, and there is no middle-click on the MacBook trackpad - which is annoying because it means you can't do X's paste action.

Is there an alternative? I'm hoping there is a keyboard binding to X's paste or better a way to bind a keyboard key/combination to the middle-click action.

Edit: I know about the emulate three-button mouse option, but that won't work for me because the trackpad only allows you to click one button at a time

share|improve this question

Almost worked for me. :) I have an iMac with a Bluetooth keyboard and this mapping mapped my down arrow to paste.

Using the unix tool xev, I determined the right command key was actually keycode 134. Naturally of course with xev, I can map any key now, so your answer got me on the right track!

# Map the right side command key on a mac keyboard to the middle mouse button

xmodmap -e "keycode 134 = Pointer_Button2"

(If you want to put back the down arrow: xmodmap -e "keycode 116 = Down")

share|improve this answer

Click both primary/left and seconary/right mouse buttons at the same time. Depending on where you need to do this, try holding one before pressing the other.

share|improve this answer
This won't work for me - the apple trackpad doesn't have buttons that can be pressed at the same time – Roland Swingler Nov 23 '09 at 11:06

I've found xsel, which goes part way to doing what I want.

share|improve this answer

I've noticed in GNOME 3 that the three-finger click works out of the box as a middle click. (at least on my setup).

share|improve this answer

Found a proper solution, using AccessX accessibility features. The following will bind the right hand command key to middle click (use xev to check the keycode on your keyboard).

xmodmap -e "keycode 116 = PointerButton2"

xkbset m

The xkbset line is critical to switch on mouse actions from the keyboard.

share|improve this answer
Just a small note. I tried your solution with PointerButton2, but that symbol was not available. It worked with Pointer_Button2 instead. Thanks for sharing! – user56958 Nov 26 '10 at 12:13
That should be: xmodmap -e "keycode 134 = Pointer_Button2"; xkbset m – Zach Sep 1 '11 at 15:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .