Fun with Synaptics
If you have ever worked with a laptop, you are bound to have played with it's touchpad. It is often configured to generate scroll events when placing a finger along the right and bottom side of the touchpad, as well as single click events when tapping on the touchpad with your finger. However, this is only the tip of the iceberg with things you can convince your driver to do.
In X.org, touchpads are powered by the Synaptics driver (no, not Synaptic, the debian package manager). If you look up it's manpage by typing
you will notice it comes with a large amount of configuration options. Not every option is that usefull for everyone (for example the 'CircularPad'-option that tells the driver you have a circular touchpad instead of a rectangular one), there are a few interesting ones. My favourites are the 'TapButton', 'VertTwoFingerScroll' and 'TouchpadOff' options.
All these options are specified in your xorg.conf file, in the 'InputDevice' section of your touchpad.
TapButton
This configuration option determines what event the touchpad generates when tapped on with one or more fingers. Please note that this is a hardware dependent feature, so not every notebook touchpad will support these settings.
There are three options (TapButton1, TapButton2 and TapButton3) which all have to be configured using an integer. The ending number of the option name states the amount of fingers tapping on the touchpad, so TapButton2 sets the event for tapping with two fingers. The integer corresponds with the generated button event, so 1 generates a mouse button event 1, 2 generates a mouse button event 2 and so on. 0 disables the generation of events.
In laymen terms, button event 1 is commonly regarded as a left click, button event 2 as a middle click and button event 3 as a right click.
My configuration settings are as followed:
code:
Now you do not need to shift your fingers to reach for the buttons below the touchpad.
VertTwoFingerScroll
Macbooks have known this feature for quite some time. The idea is that you scroll by simply 'pulling' the page down with two fingers on your touchpad. I have first seen this functionality while working with a Mac user during the last semester and since then I wouldn't want it otherwise. Using this feature, you have full use of the touchpad instead of reserving a small area at the right side for vertical scrolling.
The option is simple enough: it takes a boolean (in my case a 1 or a 0) to switch it on or off. Just like the multi-finger tap, your touchpad needs to support the detection of multiple fingers for this to work.
Regarding this subject, my xorg.conf looks like this:
code:
There is also a HorizTwoFingerScroll setting available, which basically does the same for horizontal scrolling, but I could not get it to work.
TouchpadOff
This one requires a bit of tinkering in order to be useful. Obviously you do not want your touchpad to be switched off all the time. I can imagine two situations in which you would, though: while typing and when an extra mouse is attached.
I have to admit, I have only used the first feature. I cannot really be anything more concrete about the latter than saying you could use this in combination with the hotplug system of your distribution. Somewhere in your configuration script, you can make Linux start a script when a specific device is attached. In that script you have to write the following command:
To switch it on again, you have to run:
Feel free to leave a setup for this system in the comments of this blog
.
To switch the touchpad off while typing, you can use a program called 'syndaemon'. This program runs in the background, monitoring the keyboard. When keys are pressed, it disables the touchpad for a short time. To function, it needs to be able to access the memory of the synaptics driver. This can be switched on by putting the following configuration option in xorg.conf:
code:
The daemon can be fitted with the following switches:
My distribution (Ubuntu) already comes with this daemon installed, which saves me from configuring and setting up the daemon. I can imagine that putting a script which calls this daemon in your init.d-directory will do the trick nicely.
Wrapping up
Obviously, the configuration options of the Synaptics driver are far more numerous than the three I have described here. At least I hope I have given you a reason to have a closer look at the driver if you are not satisfied with it. If you have configured your driver to do a neat trick, please let me know in the comments.
In X.org, touchpads are powered by the Synaptics driver (no, not Synaptic, the debian package manager). If you look up it's manpage by typing
man synaptics
you will notice it comes with a large amount of configuration options. Not every option is that usefull for everyone (for example the 'CircularPad'-option that tells the driver you have a circular touchpad instead of a rectangular one), there are a few interesting ones. My favourites are the 'TapButton', 'VertTwoFingerScroll' and 'TouchpadOff' options.
All these options are specified in your xorg.conf file, in the 'InputDevice' section of your touchpad.
TapButton
This configuration option determines what event the touchpad generates when tapped on with one or more fingers. Please note that this is a hardware dependent feature, so not every notebook touchpad will support these settings.
There are three options (TapButton1, TapButton2 and TapButton3) which all have to be configured using an integer. The ending number of the option name states the amount of fingers tapping on the touchpad, so TapButton2 sets the event for tapping with two fingers. The integer corresponds with the generated button event, so 1 generates a mouse button event 1, 2 generates a mouse button event 2 and so on. 0 disables the generation of events.
In laymen terms, button event 1 is commonly regarded as a left click, button event 2 as a middle click and button event 3 as a right click.
My configuration settings are as followed:
code:
1
2
3
4
5
6
| # Left click for one-finger tap Option "TapButton1" "1" # Right click for two-finger tap Option "TapButton2" "3" # Middle click for three-finger tap (takes some practice to pull off) Option "TapButton3" "2" |
Now you do not need to shift your fingers to reach for the buttons below the touchpad.
VertTwoFingerScroll
Macbooks have known this feature for quite some time. The idea is that you scroll by simply 'pulling' the page down with two fingers on your touchpad. I have first seen this functionality while working with a Mac user during the last semester and since then I wouldn't want it otherwise. Using this feature, you have full use of the touchpad instead of reserving a small area at the right side for vertical scrolling.
The option is simple enough: it takes a boolean (in my case a 1 or a 0) to switch it on or off. Just like the multi-finger tap, your touchpad needs to support the detection of multiple fingers for this to work.
Regarding this subject, my xorg.conf looks like this:
code:
1
2
3
| Option "VertTwoFingerScroll" "1" # Disable redundant edge scrolling Option "VertEdgeScroll" "0" |
There is also a HorizTwoFingerScroll setting available, which basically does the same for horizontal scrolling, but I could not get it to work.
TouchpadOff
This one requires a bit of tinkering in order to be useful. Obviously you do not want your touchpad to be switched off all the time. I can imagine two situations in which you would, though: while typing and when an extra mouse is attached.
I have to admit, I have only used the first feature. I cannot really be anything more concrete about the latter than saying you could use this in combination with the hotplug system of your distribution. Somewhere in your configuration script, you can make Linux start a script when a specific device is attached. In that script you have to write the following command:
synclient TouchpadOff=1
To switch it on again, you have to run:
synclient TouchpadOff=0
Feel free to leave a setup for this system in the comments of this blog
To switch the touchpad off while typing, you can use a program called 'syndaemon'. This program runs in the background, monitoring the keyboard. When keys are pressed, it disables the touchpad for a short time. To function, it needs to be able to access the memory of the synaptics driver. This can be switched on by putting the following configuration option in xorg.conf:
code:
1
| Option "SHMConfig" "1" |
The daemon can be fitted with the following switches:
Usage: syndaemon [-i idle-time] [-d] [-t] [-k]
-i How many seconds to wait after the last key press before
enabling the touchpad. (default is 2.0s)
-d Start as a daemon, ie in the background.
-p Create a pid file with the specified name.
-t Only disable tapping and scrolling, not mouse movements.
-k Ignore modifier keys when monitoring keyboard activity.
-K Like -k but also ignore Modifier+Key combos.
My distribution (Ubuntu) already comes with this daemon installed, which saves me from configuring and setting up the daemon. I can imagine that putting a script which calls this daemon in your init.d-directory will do the trick nicely.
Wrapping up
Obviously, the configuration options of the Synaptics driver are far more numerous than the three I have described here. At least I hope I have given you a reason to have a closer look at the driver if you are not satisfied with it. If you have configured your driver to do a neat trick, please let me know in the comments.
|
|
Requirement list in Latex |
|
|
Airplane blues |
Comments
you know how to pull this trick off when using windows vista ?
Try pulling your finger.
another really nice feature i like is circular scrolling, instead of scrolling up and down, just make a circular motion, this works much better than scrolling up/down, since you don't have to lift up your finger every page 
@Renshetmens:
Sorry, I am not that an expert on Vista. Perhaps de Synaptics driver for Windows comes with some of these features. I would suggest you try here.
@!GN!T!ON:
I have tried that one too, but I ended up activating the circular scrolling every time I was moving the cursor because I started at the circle scroll hotspot
. Still, I admit circular scrolling is a neat feature, especially useful for long pages of text.
Sorry, I am not that an expert on Vista. Perhaps de Synaptics driver for Windows comes with some of these features. I would suggest you try here.
@!GN!T!ON:
I have tried that one too, but I ended up activating the circular scrolling every time I was moving the cursor because I started at the circle scroll hotspot
[Reactie gewijzigd op dinsdag 13 mei 2008 20:23]
Yep, use Wubiyou know how to pull this trick off when using windows vista ?
Unfortunately, my Compal HEL80 doesn't have a Synaptics touchpad, but an Elantech. There is a driver available for this touchpad, but then I need to compile a kernel myself, which I try to avoid. It's not possible to build it as a module, it needs to be compiled in the kernel.
BEWARE of Wubi. It hosed my Vista box and I had to reinstall vista.
I managed to get HorizTwoFingerScoll (or rather horizontal scroll in general) working by setting the HorizScrollDelta to 60. I'm not sure 60's a good value for all touchpads though so I'd recommend you do a synclient -l|grep ScrollDelta and match the VertScrollDelta for an initial value.