Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Aug 2000 19:30:41 -0500 (CDT)
From:      Stephen Montgomery-Smith <stephen@cauchy.math.missouri.edu>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/20352: Configuring a synaptics touchpad
Message-ID:  <200008020030.TAA34138@cauchy.math.missouri.edu>

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

>Number:         20352
>Category:       kern
>Synopsis:       Configuring a synaptics touchpad
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          wish
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 01 17:40:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Stephen Montgomery-Smith
>Release:        FreeBSD 4.1-STABLE i386
>Organization:
University of Missouri
>Environment:

Trying to configure a synaptics touchpad so that for example
tapping the pad is not the same as a mouse button press.

>Description:

I have a laptop with a synaptics touchpad.  I dislike the
fact that tapping the mousepad is like pressing a mouse button.

So I attempted to port the program tpconfig available at
http://www.compass.com/synaptics/

It seems to require a device that is the raw mouse, which as far
as I can figure is not available on FreeBSD (it uses /dev/psaux
on Linux).

>How-To-Repeat:

>Fix:

I was able to provide a new ioctl for the psm device that was
sufficient to get tpconfig to work.  Lets face it, I didn't
know what I was doing - I just ramaged around the code and
scrounged something together.  But it really seems to serve
my purposes.

Maybe it could be done better.  Or maybe other people just
don't care for it - I put a feeler out on freebsd-mobile and
noone else seemed to care.

Or maybe there is something already there that will do what
I want.

But if you should choose to add something like this to the
kernel, I will port tpconfig to the ports collection.

Here is what I did:


--- sys-orig/i386/include/mouse.h	Fri Jul 28 20:12:17 2000
+++ sys/i386/include/mouse.h	Mon Jul 31 02:28:35 2000
@@ -40,6 +40,7 @@
 #define MOUSE_SETVARS		_IOW('M', 7, mousevar_t)
 #define MOUSE_READSTATE		_IOWR('M', 8, mousedata_t)
 #define MOUSE_READDATA		_IOWR('M', 9, mousedata_t)
+#define MOUSE_SENDREADCMD	_IOWR('M', 14, mousedata_t)
 
 #if notyet
 #define MOUSE_SETRESOLUTION	_IOW('M', 10, int)



--- sys-orig/isa/psm.c	Mon Jul 31 12:10:50 2000
+++ sys/isa/psm.c	Tue Aug  1 19:18:49 2000
@@ -1546,6 +1546,32 @@
     /* Perform IOCTL command */
     switch (cmd) {
 
+    case MOUSE_SENDREADCMD:
+	data = (mousedata_t *)addr;
+	if (data->len > sizeof(data->buf)/sizeof(data->buf[0]))
+	    return EINVAL;
+
+	error = block_mouse_data(sc, &command_byte);
+	if (error) 
+            return error;
+	for (s=0; s<data->len && !error; s++) {
+            if ((send_aux_command(sc->kbdc, data->buf[s])) != PSM_ACK)
+        	error = EIO;
+	}
+	if (!error) {
+    	    for (s = 0; s < sizeof(data->buf)/sizeof(data->buf[0]); s++) {
+        	data->buf[s] = read_aux_data(sc->kbdc);
+		if (data->buf[s] < 0)
+	    	    break;
+	    }
+	    if (s==sizeof(data->buf)/sizeof(data->buf[0]))
+		error = EIO;
+	    else
+		data->len=s;
+	}
+	unblock_mouse_data(sc, command_byte);
+	break;
+
     case OLD_MOUSE_GETHWINFO:
 	s = spltty();
         ((old_mousehw_t *)addr)->buttons = sc->hw.buttons;



>Release-Note:
>Audit-Trail:
>Unformatted:
 Stephen Montgomery-Smith


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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