Subject: Re: CVS commits for macppc
To: Michael Wolfson <mw@nosflow.com>
From: Aymeric Vincent <Aymeric.Vincent@labri.fr>
List: port-macppc
Date: 11/18/2004 09:58:51
Michael Wolfson <mw@nosflow.com> writes:

> > I have a local patch in my kernel to ignore the 5th button generated
> > by a tap on the trackpad because it makes Xt menus unusable, but then
> > again it looks like I'm the only one affected.
> 
> And I thought I was alone!  I just hadn't had a chance to dig into it.
> Please send me your patch.

Yup, sure. That way you'll see why I didn't commit it. ;-)

> > (I intend to change this into real support for the tap before I get
> >  rid of my iBook)
> 
> That would be great.  I'm surpised there isn't a general framework for
> this, given how common that type of trackpad is on i386 laptops as well.

Yes, I was surprised too when I started to dig, but I think the
reason is such things are handled by the hardware (or the bios?)
directly on i386.

My concern is that we'll have to hardcode timeouts in the kernel, as
well as functionality such as "triple tap" or whatever. Maybe the
cleanest way right now is to provide sysctl's to change these
behavioural properties.

 Aymeric

Index: ams.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/dev/ams.c,v
retrieving revision 1.16
diff -u -u -r1.16 ams.c
--- ams.c	15 Jul 2003 02:43:28 -0000	1.16
+++ ams.c	18 Nov 2004 08:54:19 -0000
@@ -496,6 +496,10 @@
 				buttons |= button_bit;
 			else
 				buttons &= ~button_bit;
+
+#if 1
+		mask = 0;
+#else
 		/* Extended Protocol (up to 6 more buttons) */
 		for (mask = 0x80; i < max_byte;
 		     i += (mask == 0x80), button_bit <<= 1) {
@@ -507,6 +511,7 @@
 			mask = ((mask >> 4) & 0xf)
 				| ((mask & 0xf) << 4);
 		}
+#endif
 		break;
 	}
 	new_event.u.m.buttons = sc->sc_mb | buttons;