I found some time to implement some of the features I want in the synaptic touchpad. This is taken from synaptic.c: I want to have more features :). Every touch pad (ps2 and serial) is now be supported according to STIG and every feature/capability is read. However there seems to be some very old serial touchpads that have an advanced mode not mentioned in STIG. Further I have added the following Emulation of scrolling The window drivers allow using the edge to emulate a wheel mouse. When putting the finger at the right edge, a movement up or down translates to wheel movement. Lift the finger again to operate normally again. Stick attached to a touchpad Some touchpads have a stick "attached", so they share the same port. In absolute mode the stick protocol is a simple ps2 protocol, except it is sent in an absolute packet. (In relative mode both uses ps2) Four buttons to work Some touchpads have 4 buttons. Only 3 was read and the last was set to up or down "button". Multiple fingers I have added an option to detect such by looking at pressure levels, which is not that great. If the pad have the capability to detect it, this is used instead, but this far from optimal. It does detect two horizontal parted finger if in same vertical position, otherwise the detection is bad. This is/was a problem as my wrist lays on the laptop which gives a 45 deg to horizontal for my fingers. Now I try to add further detections, which works for me in 95% of the time. Multi finger tap Using 1,2 or 3 fingers to make a tap translates into left, right or middle button pressed. I originally thought about doing what is called a "HOP" where after a quick finger shift the distance of the hop decides which button is pressed. I dropped it partly because synaptics did in version 3.2 and because it was harder than I thought. Multi finger less sensitive Adding or removing a finger or just accidently touch the pad with the palm while using the pad causes the pad to report the average position between the touched places. This of cause gives annoying erratic movements. When adding or removing fingers are detected the mouse is stop for some small time to avoid this. This is not perfect as the finger detection is not perfect, but it helps a lot! Palm detection Some touchpads tries to detect whether the reported data is from a palm or similar. When reading this signal the movement is stopped. Except the detection does not work very well :( Enabling/disabling touchpad A new corner action is to disable the touchpad. It is enabled again by tapping the same corner. This is useful if I know I am going to write a lot. The stick still works. Debugging corner action A corner action now allows toggling the debug information. The structure has changed to handle both serial and ps2 touchpads. Many variable names have changed. The documentation referred to is from "Synaptics TouchPad Interfacing Guide" revision 2.5 or just STIG Peter -- E-Mail: pebl@xxxxxxxxxx Real name: Peter Berg Larsen Where: Department of Computer Science, Copenhagen Uni., Denmark
Attachment:
gpm_synaptic_diff.gtar
Description: Binary data