Perl Trainers:
  Here's a followup to my earlier request for advice on how to get
this mouse working under Linux.

Enjoy!
-Tim

             Using a Gyration Cordless USB Mouse on Linux
                              Tim Maher
                        [EMAIL PROTECTED]
                    Sat Nov 16 12:01:12 PST 2002

SUMMARY
-------
I've got the (USB) Gyration Ultra Cordless Optical Mouse from Gyration,
Inc. working under SuSE 7.3 Linux, with XFree86 4.1.0, in full cooperation
with the simultaneously active "trackpoint" (pointy-stick-thingy) keyboard
"mouse" on my IBM ThinkPad 600e.

As far as I can tell, nobody else has figured out how to make this work,
so I'm eager to share my knowledge with other Linux users.

The most important part of my ad-hoc solution was to add a line
consisting only of "keybdev" to the /etc/hotplug/blacklist file, to
prevent the device from being recognized as a keyboard rather than
a mouse.  (Obviously, those really having a USB keyboard will need to
take another approach!)

The second change was to modify the XF86Config file to have the
appropriate (and very non-intuitive) entries to allow both mice to
be used.  I've attached my file, for your reference.

DETAILS
-------
As a Linux user since 1992, I finally got fed up with feeling pangs of
"Mouse Envy" every time I would see an iBook- or Windows- based conference
presenter walk around the stage, casually wielding a gyroscopic mouse
to advance PowerPoint slides or scroll through windows.  So I decided
to do something about it!

So I bought the latest and greatest model, the (USB) "Gyration Ultra
Cordless Optical Mouse" from Gyration, Inc. (love that name!) for about
$77 bucks from cdw.com, with a 30-day money back guarantee.

And then I spent all my spare time over the last few days trying to make
it work on Linux! 8-{

The problem was not that Linux didn't recognize it at all, but rather that
it was being incorrectly recognized, and bound to the *Keyboard Driver*
rather than the USB mouse driver.  As a result, it would respond to my
wiggling it around by inserting garbage characters into the active Xterm,
and logging "unrecognized scan code" messages into /var/log/messages.

I started my quest by asking the Vendor if they had any bright ideas,
and they didn't, but they asked me to share my solution with them if
I could find one.  Then I surfed the web for inspiration and posted
messages to various Linux newsgroups asking for advice, and I learned
about the rather essential, but immature, Linux "hotplug" system that
handles USB devices (among others).  But nobody was able to tell me how
to reconfigure it to handle this mouse correctly.

So next I studied /sbin/hotplug, /etc/hotplug,usb.agent,
hotplug.functions, usb.distmap, usb.handmap, usb.handmap,
and /etc/rc.config.d/hotplug.rc.config, along with all the
shell-execution-trace listings of the scripts in that group when they
were automatically invoked by plugging in the USB cable.

And I became confident that I could eventually modify something in there
somewhere to make the darn thing work correctly, but I was not looking
forward to the challenge.  Then I noticed the /etc/blacklist file, used
by /etc/hotplug.functions, and wondered, "What would happen if I just
entered "keybdev" there, to refuse to let it bind to the keyboard driver?
And suddenly it worked.

        I love it when that happens!

So starting with the on-site Perl class I'm teaching next week, instead
of being glued to my laptop during presentations, I'll be able to saunter
around the room while advancing slides, while also being able to type
on the laptop and use its on-board mouse when I'm in the vicinity --
all while using a Open Source operating system. I'm free!

-Tim 
*----------------------------------------------------------------------------*
| Tim Maher, CEO, CONSULTIX  (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX |
|  Ph.D. & JAWCAR ("Just Another White Camel Award Recipient")               |
|  [EMAIL PROTECTED]  teachmeunix.com  teachmeperl.com  teachmelinux.net |
*----------------------------------------------------------------------------*

Relevant sections of XF86Config:

Section "InputDevice"
  Identifier   "Keyboard[0]"
  Driver       "keyboard"
  Option       "Protocol" "Standard"
  Option       "XkbKeyCodes" "xfree86"
  Option       "XkbLayout" "us"
  Option       "XkbModel" "pc104"
  Option       "XkbRules" "xfree86"
EndSection

# This entry is for IBM TP 600e laptop's "trackpoint" mouse
Section "InputDevice"
  Identifier   "Mouse[1]"
  Driver       "mouse"
  Option       "Device" "/dev/psaux"
  Option       "Protocol" "ps/2"
  Option       "Emulate3Buttons" "off"
EndSection

# This entry is for "Gyration Ultra Cordless Optical Mouse" (USB)
Section "InputDevice"
  Identifier   "Mouse[2]"
  Driver       "mouse"
  Option       "Device" "/dev/input/mice"
  Option       "Protocol" "IMPS/2"
  Option       "ZAxisMapping" "4 5"
EndSection

Section "ServerLayout"
  Identifier   "Layout[all]"
  InputDevice  "Mouse[1]" "CorePointer"
  InputDevice  "Mouse[2]" "AlwaysCore"
  InputDevice  "Keyboard[0]" "CoreKeyboard"
  Screen       "Screen[0]"
EndSection

Reply via email to