: >
: > I have a Compaq Contura laptop with a built-in 2-button trackball which works
: > great in X. I've also have an external 3-button Logitech mouseman when
: > using my laptop in it's dockingstation. Now, I wan't to use the real mouse
: > when it's availible (with 3 buttons) and the trackball otherwise.
: >
: > My question to you is now - Can I get XFree to auto-detect when I'm using
: > the mouse and then disable the Emulate3Buttons feature?
: I faced a similar dilemma with my TI4000M - only I wanted to use both internal
: and external mice at the same time. There is no provision in XFree86 to
: detect the number of buttons on your mouse (that I know of), and the middle
: button doesn't work with Emulate3Buttons.
: Fortunately, the source to XFree86 is publically available. I located the
: appropriate section of the mouse-handling code and added a small code patch
: to pass along middle button events. I replaced the module in my server
: link kit and relinked my X server. The net result is that I can use either
: the middle button on my external mouse or a chorded left+right on my internal
: pointing device to generate a middle mouse-button event.
A little simpler process is possible if you normally run gmp for text
mode cut and paste. Grab gpm-1.04 from sunsite (or a mirror) and
configure away. As a fix for the busmice and PS/2 mice people, gpm-1.04
has a repeater option. When enabled, the mouse events are read by gpm
converted to mousesystems protocol and passed through a fifo called
/dev/gpmdata. Thus, by setting up X to read the fifo as a mousesystems
mouse, gpm handles the text consoles and passes the mouse events on to X
when you are in X. Works great for my boxes with PS/2 mice.
You are probably wondering how this helps you, right? Well gpm-1.04
also has a "-M" option for multiple mice ("-M" will automatically force
the repeater behavior). You can specify options for either mouse
depending on where the options are in relation to the "-M" option, and
the 2 button-ness and 3 button-ness of the mouse is handled by gpm.
Since gpm is translating the mouse events into the mousesystems protocol
and providing a single device, X doesn't know or care when you switch
between your mouse and a trackball in the same session.
Pretty cool, eh?
Tom
--
+--------------------------------+------------------------------+
| Tom Webster | "Funny, I've never seen it |
+--------------------------------+------------------------------+
+---------------------------------------------------------------+