From owner-freebsd-bugs Tue Aug 1 17:40:10 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 5A46E37BF88 for ; Tue, 1 Aug 2000 17:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id RAA90709; Tue, 1 Aug 2000 17:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from cauchy.math.missouri.edu (cauchy.math.missouri.edu [128.206.49.166]) by hub.freebsd.org (Postfix) with ESMTP id 7229E37BF88 for ; Tue, 1 Aug 2000 17:30:43 -0700 (PDT) (envelope-from stephen@cauchy.math.missouri.edu) Received: (from stephen@localhost) by cauchy.math.missouri.edu (8.9.3/8.9.1) id TAA34138; Tue, 1 Aug 2000 19:30:41 -0500 (CDT) Message-Id: <200008020030.TAA34138@cauchy.math.missouri.edu> Date: Tue, 1 Aug 2000 19:30:41 -0500 (CDT) From: Stephen Montgomery-Smith Reply-To: stephen@math.missouri.edu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/20352: Configuring a synaptics touchpad Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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; slen && !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