Alternative to middle click for Linux in Parallels on a MacBook?

3

3

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

Roland Swingler

Posted 2009-11-21T20:18:48.073

Reputation: 111

Answers

1

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")

Knute

Posted 2009-11-21T20:18:48.073

Reputation: 1

0

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).

John

Posted 2009-11-21T20:18:48.073

Reputation: 284

0

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.

Roger Pate

Posted 2009-11-21T20:18:48.073

Reputation:

This won't work for me - the apple trackpad doesn't have buttons that can be pressed at the same time – Roland Swingler – 2009-11-23T11:06:43.397

0

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

Roland Swingler

Posted 2009-11-21T20:18:48.073

Reputation: 111

0

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.

Roland Swingler

Posted 2009-11-21T20:18:48.073

Reputation: 111

1That should be: xmodmap -e "keycode 134 = Pointer_Button2"; xkbset m – Zach – 2011-09-01T15:03:32.733

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! – None – 2010-11-26T12:13:05.270