Re: 2nd mouse

From: Ben Measures (saint_abroadremove_at_removehotmail.com)
Date: 01/31/04


Date: Sat, 31 Jan 2004 00:40:32 +0000

Dan Jacobson wrote:
> [I have a second mouse that I want to use for xcwcp Morse code
> practice, instead of hurting my usual mouse. I want to be able to use
> both at the same time.]
>
> Ben> Just have both mice. Set [one] of your mice as
> Ben> Option "SendCoreEvents" "1"
> Ben> You can then use both mice (with both hands, fighting for the cursor ;) ).
> Maybe like
>
> Section "InputDevice"
> Identifier "Configured Mouse"
> Driver "mouse"
> Option "SendCoreEvents" "On"
> Option "Device" "/dev/psaux"
> Option "Protocol" "PS/2"
> EndSection
>
> Section "InputDevice"
> Identifier "Generic Mouse"
> Driver "mouse"
> Option "CorePointer"
> Option "Device" "/dev/ttyS1"
> Option "Protocol" "IntelliMouse"
> Option "Emulate3Buttons" "true"
> Option "ZAxisMapping" "4 5"
> EndSection
>
> Well, guess what, the first Section is completely ignored, as seen in
> /var/log/XFree86.0.log. X just must find its "Generic Mouse", all
> other Mouses are ignored, at least on Debian. Maybe you know of the
> secret Identifier for second mouses. I couldn't find it on the

The identifier is just a name.

'man XF86Config', under the 'INPUTDEVICE SECTION' (Chapter):
The Identifier entry specifies the unique name for this input device.
[snip] An InputDevice section is considered active if it is referenced
by an active ServerLayout section, or if it is referenced by the
-keyboard or -pointer command line options.

In otherwords, if the Identifier doesn't appear in the "ServerLayout"
section, it will not be active. Don't worry, its easy enough to miss -
XF86Config can be a ba*d to understand fully.

> XF86Config-4 man page. Yes, I see the promising "This can be used,
> for example, to allow an additional pointer device to generate core
> pointer events (like moving the cursor, etc)." But maybe Debian just
> finds the Identifier it wants and thats the end of it. I don't know.
> /usr/share/doc/xserver-xfree86/README.mouse.gz has no examples of two
> mice. The man page says only one CorePointer allowed. I tried

True. That's why I tried to let you know about the "SendCoreEvents"
option. I should probably have added that only one CorePointer is
allowed but the other pointer can SendCoreEvents.

> Identifier "Morse Mouse" instead of Configured Mouse, no help.

I decided to take some time out especially to help you. Understand that
I am only making time for you because you seem to have tried to read the
manpage. So in return...

I tried it myself. I had two mice: one PS/2 and one USB mouse. I'm just
finishing this post off using both of them to control my cursor. What
follows are the relevant bits of my XF86Config. Make sure you change the
identifiers (names) as needed.

--Begin--

Section "InputDevice"
        Identifier "PS/2 Mouse"
        Driver "mouse"

        Option "Protocol" "IMPS/2"
        Option "Device" "/dev/psaux"
        Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
        Identifier "USB Mouse"
        Driver "mouse"

        Option "Protocol" "IMPS/2"
        Option "Device" "/dev/input/mice"
        Option "ZAxisMapping" "4 5"
EndSection

Section "ServerLayout"
        Identifier "My Layout"
        Screen "My Screen"
        InputDevice "Standard Keyboard" "CoreKeyboard"
        InputDevice "PS/2 Mouse" "CorePointer"
        InputDevice "USB Mouse" "SendCoreEvents" "true"
EndSection

--End--

And here is what I get in the logs:

--Begin--

(**) ServerLayout "My Layout"
(**) |-->Screen "My Screen" (0)
(**) | |-->Monitor "My Monitor"
(**) | |-->Device "NVIDIA Graphics"
(**) |-->Input Device "Standard Keyboard"
[snip]
(**) |-->Input Device "PS/2 Mouse"
(**) |-->Input Device "USB Mouse"
[snip]
(II) Keyboard "Standard Keyboard" handled by legacy driver
(**) Option "Protocol" "IMPS/2"
(**) PS/2 Mouse: Protocol: "IMPS/2"
(**) Option "CorePointer"
(**) PS/2 Mouse: Core Pointer
(**) Option "Device" "/dev/psaux"
(**) PS/2 Mouse: Emulate3Buttons, Emulate3Timeout: 50
(**) Option "ZAxisMapping" "4 5"
(**) PS/2 Mouse: ZAxisMapping: buttons 4 and 5
(**) PS/2 Mouse: Buttons: 5
(**) Option "Protocol" "IMPS/2"
(**) USB Mouse: Protocol: "IMPS/2"
(**) Option "SendCoreEvents"
(**) USB Mouse: always reports core events
(**) Option "Device" "/dev/input/mice"
(**) USB Mouse: Emulate3Buttons, Emulate3Timeout: 50
(**) Option "ZAxisMapping" "4 5"
(**) USB Mouse: ZAxisMapping: buttons 4 and 5
(**) USB Mouse: Buttons: 5
[snip]
(II) PS/2 Mouse: ps2EnableDataReporting: succeeded
(II) USB Mouse: ps2EnableDataReporting: succeeded

--End--

Hope this walkthrough helps you out. I don't normally have time to write
many of these!

-- 
Ben M.
----------------
What are Software Patents for?
To protect the small enterprise from bigger companies.
What do Software Patents do?
In its current form, they protect only companies with
big legal departments as they:
a.) Patent everything no matter how general
b.) Sue everybody. Even if the patent can be argued
	invalid, small companies can ill-afford	the
	typical $500k cost of a law-suit (not to mention
	years of harassment).
Don't let them take away your right to program
whatever you like. Make a stand on Software Patents
before its too late.
Read about the ongoing battle at http://swpat.ffii.org/
----------------

Quantcast