Combining 2-button trackball with 3-button mouse

Combining 2-button trackball with 3-button mouse

Post by Jakob Schlyt » Tue, 24 Oct 1995 04:00:00



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?

/Jakob

--

Phone:  +46 31-772 1019, +46 70-595 07 94    Department of Computing Science
Fax:    +46 31-16 56 55                      Chalmers University of Technology
http://www.cs.chalmers.se/~jakob/            S-412 96 Goteborg

 
 
 

Combining 2-button trackball with 3-button mouse

Post by Thomas J » Fri, 27 Oct 1995 04:00:00



>  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.

I posted a summary to comp.windows.x.i386unix, so you might try to retrieve
that article if it has yet expired.  I tried crossposting it here, but it
never made it.  In short, although I included the source patch in my posting,
applying it is very difficult if you don't have a full XFree86 source tree
on your hard drive.  I have recompiled object modules and libraries for the
link kit, so you can just drop them in and relink.  E-mail me for details.
--
Thomas Wu                                 PCMCIA - People Can't Memorize

US Snail: Rains Apt. 13C, 704 Campus Dr.  (415) 497-6437
          Stanford, CA 94305              Why is there a "cult" in "culture"?

 
 
 

Combining 2-button trackball with 3-button mouse

Post by Thomas J » Fri, 27 Oct 1995 04:00:00



>  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.

Have you actually tried this yourself?  The problem is that, at least on my laptop,
the internal and external mice are handled in hardware and presented to the OS as a
single mouse.  gpm/X can't tell whether I've moved or clicked my internal pointing
device or my external mouse.  Unless gpm performs the function of Emulate3Buttons and
passes along middle-button events as well, my X server patch is still necessary AFAIK.
--
Thomas Wu                                 PCMCIA - People Can't Memorize

US Snail: Rains Apt. 13C, 704 Campus Dr.  (415) 497-6437
          Stanford, CA 94305              Why is there a "cult" in "culture"?
 
 
 

Combining 2-button trackball with 3-button mouse

Post by Tom Webst » Fri, 27 Oct 1995 04:00:00




: >
: >  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   |


+--------------------------------+------------------------------+

+---------------------------------------------------------------+

 
 
 

1. Combining 2-button trackball with 3-button mouse

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?

/Jakob
--

Phone:  +46 31-772 1019, +46 70-595 07 94    Department of Computing Science
Fax:    +46 31-16 56 55                      Chalmers University of Technology
http://www.cs.chalmers.se/~jakob/            S-412 96 Goteborg

2. [REPOST][REPOST] Killing processes in D state

3. Emulating 3-button mouse/trackball with a 2-button device?

4. Can't install Linux w/AHA-2940

5. Can 2-button mouse do 3-button mouse works?

6. Problem when replacing NIC (error: MAC addr is diff)

7. : 2-button vs 3-button mouse

8. the never ending TERMCAP saga

9. Make a 2-button mouse function like 3-button?

10. replacing 2-button with 3-button mouse

11. Using middle button on 2-button mouse

12. Can 2-button Mouse work as 3-Buttons??

13. Middle button on 3-button mouse not registering