Running X11 with a 2 button PS/2 mouse

Jim Frost madd at bu-cs.BU.EDU
Fri Sep 29 09:00:54 AEST 1989


In article <309 at bulus3.BMA.COM> haugen at bulus3.BMA.COM (John M. Haugen) writes:
|Is there any way to map the third button to another key or a combination of
|the other two mouse buttons?

Not under ISC 386/ix.  One thing that you can do is to use xmodmap to
toggle button 2 and button 3 bindings from the window manager:

	xmodmap -e "pointer = 1 3" # map button 2 to button 3
	xmodmap -e "pointer = 1 2" # map button 2 to itself

This can be done manually, too, but I find that having it on my twm
applications menu works pretty well.

I spoke to the ISC person who did much of the mouse handling (sorry,
your name is at work an I'm not) and he said he'd experimented with
chording (multiple simultaneous buttons producing unavailable
buttons), but that this causes problems with some X applications.
He's right, of course, not to mention all the timing problems that
chording causes.  Not having the third button causes more problems,
though :-).

I think of this as an X deficiency; there really should be some way to
xmodmap any key/pointer combination to any other, allowing the user to
configure his/her system to allow rctrl-button-2 to mean button 3, for
instance.  Given the general response of the MIT people to my
complaints, don't look for this anytime soon.

A lot of people complain that we X applications writers should "do the
right thing" and use the database functions that X gives.  They're
right, of course, but speaking as an applications writer let me tell
you that X isn't the easiest thing to write a real application in in
the first place, much less to do right.  It should not really be up to
the application writer to handle this mapping anyway, but this kind of
gets back to the same arguments I have with the MS-DOS technique of
having each application handle globbing.

Good luck,

jim frost
software tool & die
madd at std.com



More information about the Comp.unix.i386 mailing list