Subject: Mouse questions (low-level)
To: None <port-i386@NetBSD.ORG>
From: Brian C. Grayson <bgrayson@ece.utexas.edu>
List: port-i386
Date: 07/12/1996 00:18:38
  System:  i386 port, running NetBSD-1.1, accessing the mouse
via /dev/tty00

  I suspect that my brand new cheap Dynapoint(r) serial mouse
isn't behaving as a 3-button mouse -- it seems to ignore the
middle button.  Via kermit, I found that it sends the sequence
0x40 0x00 0x00 for all button releases (with no other
buttons pressed), but it also sends the same sequence when
button 2 is pressed.  (It sends 0x60 0x00 0x00 for a
right-button press, and 0x50 0x00 0x00 for a left-button-press,
so I would expect 0x4{8,4,2,1}? for the middle button, or some
weird codes since the middle-button was a kludge, I believe).

  Before I bring it to the store and complain (I've got two other
pending complaints with them), I wanted to make sure I wasn't
overlooking anything.  The mouse claims to be Micro$oft
compatible, and is a serial mouse.  I tried all 8 mouse
protocol options under XFree86, with all the various
combinations of options, with no middle-button success.  Some
portion of the XFree86 docs mentioned that some 3-button mice
revert to 2-button if one of their buttons isn't pressed during
bootup, but that didn't seem to help.

  Does anyone know any more info that could help me?  Is there
any man page or other low-level documentation for the mice?
I didn't see anything from a quick check (besides very short
man pages for mms, lms, etc).  I looked at the info in the mms
driver and in /usr/include/machine/mouse.h, but those bit
definitions don't seem to quite match with my experience above,
so I'm guessing the serial port mice behave differently from
them.  I also examined the source code for XFree86 for the
mouse, but am afraid that at first glance it's a little too
daunting (handling 8 protocols all at once doesn't make for easy
reading!).  I'll keep looking at it, though.  I tried the "*X"
and "*V" mouse commands, but they didn't seem to have any effect,
and I think they only apply to MouseMan mice.

  Thanks for any insight!

  Brian
-- 
Brian Grayson (bgrayson@ece.utexas.edu)
Graduate Student, Electrical and Computer Engineering
The University of Texas at Austin
Office:  ENS 406       (512) 471-8011
Finger bgrayson@pine.ece.utexas.edu for PGP key.