You are not logged in.

#1 2010-04-07 15:11:57

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Touchpad, middle mouse button and browser tabs

My laptop touchpad, like most, has only a left and right mouse button (LMB, RMB, generating button 1 and button 3 events) and to generate a middle mouse button click (MMB, button 2 event) I have to hold down both together. In Chrome, MMB is used to open a link in a new tab, which I use a lot.

Much easier using Chrome with the Right Click Opens Link in New Foreground Tab extension.

When I switched to Midori, I couldn't get that user script to work but these lines did the trick:

xmodmap -e "pointer = 2 1 3"
synclient TapButton1=2

1) I always tapped the touchpad for a left click anyway so that left the touchpad LMB unused.

2) As the LMB and RMB are swapped, clicking the LMB now generates a "button 2 event" as shown by xev, so that opens a link in a new tab in Midori.

3) The synclient line means when I tap the touchpad once, it reports a 2nd button event, but since that has been swapped, X receives a LMB click.

4) If I want to "drag-select", the old method was to hold down the LMB and then stroke the touch pad; I now have to hold down LMB and RMB together and then stroke. I could probably set up an accelerator to help but mostly I'm selecting words or lines (double or triple taps on the touchpad).

Offline

Board footer

Powered by FluxBB