Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Nov 1996 08:31:44 -0500
From:      "Louis A. Mamakos" <louie@TransSys.COM>
To:        sos@FreeBSD.org
Cc:        jkh@time.cdrom.com (Jordan K. Hubbard), current@FreeBSD.org
Subject:   Re: FreeBSD-3.0-current PS/2 mouse driver change 
Message-ID:  <199611271331.IAA01084@whizzo.transsys.com>
In-Reply-To: Your message of "Wed, 27 Nov 1996 09:04:00 %2B0100." <199611270804.JAA00372@ravenock.cybercity.dk> 
References:  <199611270804.JAA00372@ravenock.cybercity.dk> 

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Thanks for your reply.  I've enclosed the diffs below.  Please note that
right now, the new psm.c driver in the kernel renders this pointing device
helpless to do it's nifty bits.  The additional "smarts" in the kernel 
driver seems to mask off the bit which indicates a "tap" gesture on the
pad.  I've just upgraded to 3.0-current last night, and have only begun
to look at the driver.

The moused changes, on the other hand, I've been running on a couple of
machines for about 3 weeks now, and it seems to work great.

When I get the kernel driver working again, I'll send those changes in
too...

louie


[-- Attachment #2 --]
--- /usr/src/usr.sbin/moused/moused.c	Thu Sep 26 23:38:48 1996
+++ moused.c	Wed Oct 16 22:30:25 1996
@@ -72,6 +72,7 @@
 #define R_LOGIMAN	6
 #define R_PS_2		7
 #define R_MMHITAB	8
+#define	R_GLIDEPOINT	9
 
 char	*rnames[] = {
     "xxx",
@@ -83,6 +84,7 @@
     "mouseman",
     "ps/2",
     "mmhitab",
+    "glidepoint",
     NULL
 };
 
@@ -97,6 +99,7 @@
     (CS7		   | CREAD | CLOCAL | HUPCL ),	/* MouseMan */
     0,							/* PS/2 */
     (CS8		   | CREAD | CLOCAL | HUPCL ),	/* MMHitTablet */
+    0,							/* Glidepoint */
 };
 
     
@@ -215,6 +218,7 @@
 	    rodent.portname = "/dev/mse0";
 	break;
     case R_PS_2:
+    case R_GLIDEPOINT:
 	if (!rodent.portname)
 	    rodent.portname = "/dev/psm0";
 	break;
@@ -273,6 +277,8 @@
 void
 usage(void)
 {
+    int i;
+
     fprintf(stderr,
 	    " Usage is %s [options] -p <port> -t <mousetype>\n"
 	    "  Options are   -s   Select 9600 baud mouse.\n"
@@ -283,15 +289,10 @@
 	    "                -D   Lower DTR\n"
 	    "                -S baud  Select explicit baud (1200..9600).\n"   
 	    "  <mousetype> should be one of :\n"
-	    "                microsoft\n"
-	    "                mousesystems\n"
-	    "                mmseries\n"
-	    "                logitech\n"
-	    "                busmouse\n"
-	    "                mouseman\n"
-	    "                ps/2\n"
-	    "                mmhittab\n"
 	    ,progname);
+    
+    for (i = 1; rnames[i]; i++)
+	fprintf(stderr,  "                %s\n", rnames[i]);
  
     exit(1);
 }
@@ -392,7 +393,8 @@
 	write(rodent.mfd, "*X", 2);
 	setmousespeed(1200, rodent.baudrate, rodentcflags[R_LOGIMAN]);
     } else {
-	if ((rodent.rtype != R_BUSMOUSE) && (rodent.rtype != R_PS_2))
+	if ((rodent.rtype != R_BUSMOUSE) && (rodent.rtype != R_PS_2)
+	    && (rodent.rtype != R_GLIDEPOINT))
 	{
 	    /* try all likely settings */
 	    setmousespeed(9600, rodent.baudrate, rodentcflags[rodent.rtype]);
@@ -482,6 +484,7 @@
     { 	0x40,	0x40,	0x40,	0x00,	3 	},  /* MouseMan */
     {	0xc0,	0x00,	0x00,	0x00,	3	},  /* PS/2 mouse */
     {	0xe0,	0x80,	0x80,	0x00,	3	},  /* MM_HitTablet */
+    {	0xc0,	0x00,	0x00,	0x00,	3	},  /* glidepoint */
     };
   
     debug("received char 0x%x",(int)rBuf);
@@ -603,6 +606,16 @@
 	act.buttons = (pBuf[0] & 0x04) >> 1 | /* Middle */
 	              (pBuf[0] & 0x02) >> 1 | /* Right */
 		      (pBuf[0] & 0x01) << 2; /* Left */
+	act.dx = (pBuf[0] & 0x10) ?    pBuf[1]-256  :  pBuf[1];
+	act.dy = (pBuf[0] & 0x20) ?  -(pBuf[2]-256) : -pBuf[2];
+	break;
+
+    case R_GLIDEPOINT:		/* Glidepoint */
+	act.buttons = ((pBuf[0] & 0x04) ? MIDDLE_BUTTON : 0) |
+	              ((pBuf[0] & 0x02) ? RIGHT_BUTTON : 0)  |
+		      (((pBuf[0] & 0x01) ||
+			((pBuf[0] & 0x08) == 0)) ? LEFT_BUTTON : 0);
+
 	act.dx = (pBuf[0] & 0x10) ?    pBuf[1]-256  :  pBuf[1];
 	act.dy = (pBuf[0] & 0x20) ?  -(pBuf[2]-256) : -pBuf[2];
 	break;

*** /usr/src/etc/sysconfig	Thu Sep 26 23:16:37 1996
--- sysconfig	Wed Oct 16 22:59:25 1996
***************
*** 47,53 ****
  saver=NO
  
  # Set to
! # {microsoft|mousesystems|mmseries|logitech|busmouse|mouseman|ps/2|mmhittab}
  # to activate system mouse cursor support (or NO for none)
  # Use 'vidcontrol -m on' command to activate it on particular screen
  mousedtype=NO
--- 47,53 ----
  saver=NO
  
  # Set to
! # {microsoft|mousesystems|mmseries|logitech|busmouse|mouseman|ps/2|mmhittab|glidepoint}
  # to activate system mouse cursor support (or NO for none)
  # Use 'vidcontrol -m on' command to activate it on particular screen
  mousedtype=NO

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611271331.IAA01084>