Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jdavidb (1361)

jdavidb
  (email not shown publicly)
http://voiceofjohn.blogspot.com/

J. David Blackstone has a Bachelor of Science in Computer Science and Engineering and nine years of experience at a wireless telecommunications company, where he learned Perl and never looked back. J. David has an advantage in that he works really hard, he has a passion for writing good software, and he knows many of the world's best Perl programmers.

Journal of jdavidb (1361)

Tuesday March 20, 2007
11:43 PM

Thinkpad Trackpoint mouse buttons with X

[ #32758 ]

I purchased a used Thinkpad A30 last year. It's not in the best shape, but it's good enough for me for most purposes.

Unfortunately IBM marches to the beat of a different drummer when it comes to laptop pointing devices. First of all there is no trackpad. All I get is the "eraser." Turns out the IBM trademarked name for the eraser is the Trackpoint, although the term encompasses not just the "pointing stick" (the generic term for the eraser according to Wikipedia) but the buttons and apparently the trackpad, if existing. Newer Thinkpads do have a trackpad, interestingly enough. IBMs published webpages on the Trackpoint claim that everybody loves it. I'm sure there are Trackpoint enthusiasts out there who think it's the greatest thing in the world, just as there have always been Macintosh lovers and are in fact a lot more of them now than ever before. But I am at present a curmudgeonly old Trackpoint non-lover.

Another way in which the Trackpoint differs is that I have a middle mouse button. Now when I first saw this I thought it was great because I knew I would spend the majority of my time on this laptop in X, either under Linux or in Cygwin. (Turns out Cygwin ... so far I still have whatever install of Windows XP came with this box and what with having Cygwin and Firefox I'm not sure I care what OS I'm running.) A middle mouse button on a laptop is a great idea. Even for people who don't use X. Unfortunately IBM's Trackpoint middle mouse button isn't a middle mouse button at all.

IBM doesn't realize anyone would use something between the left and right mouse buttons for anything other than scrolling. And they've apparently never noticed that the scroll wheel on wheel mice depresses and serves as a button in addition to a wheel. (I've been led to believe somewhere that those wheels thus generate signals as if they were three unique mouse buttons: 3 for middle, 4 and 5 for up and down. But I'm not sure if that's accurate.) So this button serves only to switch the functions of the eraser from moving the mouse to scrolling. I guess that's similar to how clicking the wheel button on a wheel mouse works (though actually I rarely do that -- I just scroll the wheel), although you have to hold it down for the effect to continue.

But wait, there's more. Whatever it does internally, software-wise, is apparently entirely different from clicking the wheel button on a wheel mouse (which X picks up as a simple middle mouse button click). Only certain applications seem to be aware of it. Firefox absolutely does nothing when I hold down this button. The eraser just appears to quit working. Internet explorer does some clunky scrolling. Online references lead me to believe that Microsoft Office applications should work, or did at one time, but the versions that I have installed don't seem to recognize it. (And those are fairly new versions.) I did discover that the Trackpoint driver didn't seem to be installed, so that may have been part of the problem.

As I mentioned, there's basically two applications I use, from Windows's point of view: Firefox, and Cygwin. (I also pull out Freeciv about once every three months, and a middle mouse button would be nice there.) As is, the enticingly-useful middle mouse button is worthless, and this is how I have lived since late last year when I bought this machine.

Tonight I sat down with a project I intended to work hard on with Cygwin. I didn't want to plug in a mouse. I'm tired of having to plug in a mouse to get a real middle mouse button. Even on my old one-button ibooks I could get button emulation. Plus there've been some USB issues on this machine. It may actually need repairs. The USB ports are currently disabled. There's that taunting button, and it was no good to me.

So I started looking around. I knew Sarah's old laptop had been configured to chord: striking both buttons at one time produced a middle mouse button effect. I never figured out why none of mine seemed to have that feature. Chording would be helpful, although still seem ridiculous since I have a middle button. I also knew that chording was built into X Windows and was therefore probably available in Cygwin somehow. I also assumed that other Thinkpad users had faced this situation, grown angry, and discussed workarounds online.

I learned about the Trackpoint driver. I learned that at least one Thinkpad Cygwin user just wanted to get scrolling to work. I really didn't care that much about scrolling. I want to paste! And I'd prefer not to do it with chording.

I learned that Cygwin can emulate three buttons (chording), but only if I run XWin.exe. I run startx, which calls X.exe. I have no idea what the difference is between XWin.exe and X.exe. I also have no idea how to tell startx to pass the right option to X.exe, or call XWin.exe instead (and pass it the right option). I did have a desktop shortcut to start X sitting around, which turned out to be a shortcut to a batch file that used Cygwin's run program to just start X, without a console, and that actually looks like a good effect to achive but is done very inelegantly. Made myself a copy of that batch script and added the right option, and I could chord in X. Voila!

Still not satisfied, of course. Chording's too much work for this guy, who prides himself on laziness but has already gone on for paragraphs about the whole thing. I kept Googling.

And finally I learned the secret. I hadn't yet gotten around to the Trackpoint driver. I was hoping I could install it and there would be a way to configure it to make the middle button a real middle button. But I wasn't finding any references to that feature, if it's possible. But finally I discovered that I didn't have to use IBM's driver for my Trackpoint. (Well, this was already obvious, as I was using Windows XP without a Trackpoint driver, and the Trackpoint worked just fine. Well, "just fine" for the Trackpoint, as far as that goes.) And Logitech Mouseware would allegedly give me the configurability I wanted.

And so it does. The entire point of this entry is to tell myself and anyone else looking for information on getting the middle mouse button of the IBM Thinkpad Trackpoint to work the way they want that they should Google for Logitech Mouseware, download and install it (you'll have to do a reboot -- yay Windows), and then you'll get to go through a configure process that allows you to select a function for "button 2." Button 2 is the mouse signal generated when you hit your Trackpoint middle button and also when you chord. There are about a zillion options for what you can make this do. Set it to "middle mouse button." (Although some of the others look interesting and I may try them at some point.) Bingo; you're there.

Now if you click that button in any app, the app gets a straight middle mouse button signal. Middle click in Firefox, and I get a scrolling indicator like clicking the wheel on a wheel mouse. Middle click in X, regardless of how I started it, and I get pasting ability! Wonderful! Now I can work on my project. Of course, now I should probably just go to bed instead.

You might find some references online that say that Logitech Mouseware cannot work with the Trackpoint. This is old news. Logitech figured out how to make their driver work with Trackpoint, and I saw that mentioned in at least one discussion.

Of course now I realize that at some point I may find that I'm going to want to scroll in X. And I probably won't be able to, with this setup. I may be able to find another setting in Mouseware that'll give me what I want all the time. I might conceivably switch to scrolling behavior (one way of achieving this with the Trackpoint driver comes up in the Cygwin/X mailing lists and/or FAQ in Google searches) and stick with chording for pasting, but I seriously doubt it. I don't scroll all that often in X, and I cut my teeth in X on boxes that didn't have a wheel mouse. (I can remember asking somebody to explain the wheel to me, because I couldn't for the life of me figure out what it was for. But then, I can also remember when I didn't understand why you'd want more than one mouse button. :D) But I also saw a message somewhere that somebody had developed another solution to this problem: a patch to X that tells it when the middle Trackpoint button is depressed to set a timeout and if the button is released within that timeout, treat it as a "middle button/paste" event, and if it is held down, treat it as a "scroll as long as the button is held/normal Trackpoint behavior" event. It sounded like this was for Linux on Thinkpad, though, not Cygwin. And it sounded like it was a patch that was in somebody's bleeding edge CVS somewhere and may not be in production anywhere and may get completely forgotten.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.