Synaptics Touchpad Wmode Support for Linux

UPDATE 2003-07-13: Check out http://w1.894.telia.com/~u89404340/touchpad/ if you run kernel 2.5.72 and higher.
UPDATE: This patch has been included in the gpm-1.19.5 release. Skip the patching part in step 1 if you have gpm-1.19.5 or above.

Following patch to gpm-1.19.4 allows the synaptics driver ("-t synps2") in gpm to use the wmode of the touchpad.
http://ccdw.org/~cjj/files/patch/gpm-1.19.4-syn_wmode-1.patch
The wmode of the synaptics touchpad supports the readout of the two scroll buttons. Using the patch the "up" button becomes the "middle" button of a three button mouse while the "down" button becomes an extra forth button.

This patch implements the tap and drag functions which translates the taps on the touchpad into mouse clicks and drag. It allows the modifications of various tap parameters through the configuration file, "/etc/gpm-syn.conf". Addtionally, it has a "drag-lock mode" which allows the finger to leave the pad without ending a drag.

The step by step instruction below shows how to use this driver in XFree86-4.1.0.
1. download gpm-1.19.4 and apply the patch
gpm source code can be downloaded from ftp://arcana.linux.it/pub/gpm/gpm-1.19.4.tar.bz2 . Put the patch and the file in the same directory and do the following:
tar zxf gpm-1.19.4.tar.bz2
cd gpm-1.19.4
patch -p1 < ../gpm-1.19.4-syn_wmode-1.patch
2. compile gpm and install it
Please consult the documents of gpm. However, in most cases, all you need to do is go to the gpm directroy and:
./configure
make
make install
3. configure gpm to use synaptics driver and run in repeater mode
To use the synaptics driver and run gpm in repeater mode, you need to start gpm with the options:
gpm -m /dev/psaux -t synps2 -3 -R
or
gpm -m /dev/misc/psaux -t synps2 -3 -R
if you use devfs.
4. configure XFree86 to use gpm as mouse device
The repeater mode of gpm use a pipe file, "/dev/gpmdata", to emulate a mouse device. By default it emulates a Mouse Systems mouse. So, you can put the following lines in the mouse section of your XF86Config file:
option "Device" "/dev/gpmdata"
option "Protocol" "MouseSystems"
5. enable wmode of the synaptics driver
By default, the wmode is disabled. To enable it, you need to create a configuration file "/etc/gpm-syn.conf" with the line:
use_wmode 1
Now, you should be able to use the "up" button of the Synaptics touchpad as the middle button to paste in X.

Chun-Chung Chen (cjj at u.washington.edu)