The X Window System paradigm for using mouse buttons is, in my opinion, one of the most elegant and effective user interface methods ever concieved. It requires a three-button mouse. The first button is the general point-and-select button. The middle button is the "paste" button. The third button is the "pull down menu for more options" button.
Unfortunately, computers interfaces are designed increasingly for those who cannot read or write. Like a medieval iPeasant, they can only gawk and point at icons on the signs hanging above shop windows. These people require only one or two buttons. At the same time, the ancient medium of the scroll has been reintroduced, leading to methods for moving quickly through them. This is a truly antiquarian problem that hadn't been seen for over a thousand years - not since the introduction of the codex.
The upshot of all of this is that true three-button mice are almost impossible to find now. Moreover, while almost every real UNIX person has a stash of true three-button mice, they're almost certainly PS/2 interface devices (PS/2 ports are harder to find now) and probably aren't optical (optical mice do have an advantage in the eternal battle against cat hair and cookie crumbs).
The Logitech "Zone Touch Mouse T400" is an interesting device. The middle button is actually a touchpad which also has two (I think two) physical clickable actions to it. You can use it like a scroll-wheel by swiping your finger up and down along it. But you can also use it as a middle mouse button by clicking on it (I think that technically it has two different clicks, one at the far end and one at the near, but I end up remapping them to just one click). In practice this works entirely differently than a wheel. You cannot click on a wheel without either accidentally moving the cursor or cramping up your hand and risking repetitive stress injury. Clicking on the touchpad-middlebutton of the T400, by way of contrast, works just like a plain middle mouse button.
It would appear that the mouse hardcodes its middle button click to the "Super+L" key (that is, the left "Windows" key on a PC keyboard). It takes two programs to overcome this foolishness: xbindkeys to alter the keyboard binding, and xdotool to reassign it to what it should be. Both need to be installed:
sudo pacman -S xbindkeys sudo pacman -S xdotool
"xdotool click 2" m:0x0 + c:133
xrdb ~/.Xresources xbindkeys exec fvwm
While figuring out how to configure the T400, I ran across a couple of commands which might be generally useful when debugging such things (especially since the traditional X Window System tools aren't always distributed nowdays).
"(Scheme function)" m:0x0 + c:133 Pointer_Button2
This output is intended as a guide for constructing an entry in "~/.xbindkeysrc". The first line indicates that you should put a command in quotation marks in your "~/.xbindkeysrc". Don't use "(Scheme function)" literally - use the command you want executed. The second and third lines are the things which are supposed to trigger the command (that is, they encode the click you just did). I haven't tried the version in the third line ("Pointer_Button2") because, for me, the second line worked (m:0x0 + c:133). So, using this output as a guide, I created my "~/.xbindkeysrc" file:
"xdotool click 2" m:0x0 + c:133
The program "solaar" is used to configure/query the Logitech "Unifying Receiver Device". This is the little chicklet that plugs in to a USB port and receives the signals from the wireless T400. Apparently, it can handle multiple Logitech devices, but will be configured by default for only one (so you need solaar to configure it for more complex situations). The program (solaar) is in the Arch Linux AUR. If you run:
In such a mouse, the first and third buttons are as they always were. In between them is a wheel which would have been just the thing at the Library of Alexandria (but which is not necessary, and is increasingly less relevant as swiping a touchscreen becomes common). To get the middle button, you press down on the wheel.
The reason that this style of mouse won't work as a proper three-button mouse is that, unless you grip it in ways which will cramp up your hand in minutes and lead to bad repetitive-stress injuries, you cannot click the middle button (the wheel) without rotating the wheel and moving the on-screen location where you're clicking. Using such a mouse is misery.
The solution is very simple: surgically alter the "three-button wheelmouse" so as to disable the input from the rotation of the wheel. With such a modified mouse, the wheel is still there, and probably still spins, but spinning it does nothing. This means that you can simply click it for a proper middle button without damaging your hand.
You do lose the function of the wheel, but that's a small price to pay for having, once again, the most elegant user interface method ever devised for text. (The middle button is also a bit bumpy, as it's still physically a wheel.)
Of course, hacking a wheelmouse in this way is a stopgap. What I should really do is design and 3-D print a new cover for a standard existing wheelmouse which just provides a regular middle button with no bumpy disabled wheel at all.
The first time I tried this it was with a generic Chinese wheelmouse (Model SM-1035). In it, the wheel is mounted on an axle which has two "cradle" flanges below it. The left side of the axle sticks into a potentiometer; this provides the wheel function. It also acts as a pivot so that pressing the wheel down pushes the right side of the axle down to contact a microswitch.
All portions of this document not noted otherwise are Copyright © 2014 by David M. MacMillan and Rollande Krandall.
Circuitous Root is a Registered Trademark of David M. MacMillan and Rollande Krandall.
This work is licensed under the Creative Commons "Attribution - ShareAlike" license. See http://creativecommons.org/licenses/by-sa/3.0/ for its terms.
Presented originally by Circuitous Root®
Select Resolution: 0 [other resolutions temporarily disabled due to lack of disk space]