Taming a Synaptics Clickpad
About the lamest component of my current machine, a Lenovo XP 240, is the touchpad. Well, it's actually a clickpad, i.e., a thing without real buttons that you can press to make mouse button clicks.
Yes, this machine was designed at a time when everyone thought they had to follow Apple's lead in abolishing the mouse buttons. What they had not considered: while OS X is built around the (IMHO somewhat foolish) notion that there's just one mouse button, in conventional X11 (roughly, left: mark, middle: paste, right: context menu), having just one button really is no fun.
Fortunately, one can define the button areas rather liberally by X11-configurung the synaptics driver (and prototype things using the synclient program, once one gets used to it quirks[1]) Some duct tape one will even give add some tactile feedback to the pad so you can feel the buttons without having to look:
This still stinks, because every time one clicks, the mouse pointer moves. Fortunately, thinkpads also have a stick for pointer motions, and so I could switch off pointer motion through the touchpad entirely. I did that by setting AreaTopEdge to 0 (the default) and AreaBottomEdge to 10 (or something similarly small). Hardware clicks and the detection of the finger's location is unaffected by that setting.
That has worked fine (within reason), for all the, what, eight years that I've used this box. But my stint into the fediverse made me revisit my clickpad hack. This is because the mastodon client Tootle does not have useful key bindings (like: space bar scrolls a page).
I have considered adding them but lost all motivation when I noticed that the current vala source does not build on Debian stable, and apparently by a large margin (ah, hipsterware!). I then briefly considered writing mastodon reader myself in a bit of Tkinter but got sidetracked when I noticed I'd have to render at least some subset of HTML (which is an interesting problem in itself, and tk_html_widgets looks fairly promising; but I still let it go).
And so I've finally implanted a scroll wheel into the stupid synaptics clickpad by enabling two-finger scroll. However, one cannot just switch on two-finger scroll without also switching on pointer motion, too (or can one?). After quite a bit of fiddling, I figured having a little patch in the middle of the touchpad sensitive keeps the number of inadvertent pointer movements to a minimum; once you have a finger there, you can use the entire pad for scrolling with the other finger.
In sum, this gives the following piece of xorg.conf material, to be dumped to /etc/X11/xorg.conf.d/50-synaptics.conf:
Section "InputClass" Identifier "touchpad" MatchProduct "SynPS/2 Synaptics TouchPad" Driver "synaptics" Option "ClickPad" "True" # Three buttons of equal size, stretching the whole way vertically Option "SoftButtonAreas" "67% 100% 0 0 30% 67% 0 0" # Turn off motion altogether: AreaBottomEdge 10 AreaTopEdge 0 # Motion only detected betwee A.T.E. and A.B.E. # Here, use an aread in the middle of the pad: Option "AreaTopEdge" "2400" Option "AreaBottomEdge" "3200" # Now enable scrolling with one finger on the sensitive area, the # other finger moving to scroll. Raising FingerHigh can help # reducing accidental moves. VertScrollDelta lets you Option "VertTwoFingerScroll" "True" Option "VertScrollDelta" "60" Option "FingerHigh" "60" # Our Buttons are on the full area anyway, so: Option "HasSecondarySoftButtons" "False" # A bit of config spam that I'm too lazy to regression test out. # I'd expect they're rather safe to drop, though. Option "VertResolution" "1000" Option "HorizResolution" "650" Option "MinSpeed" "1" Option "MaxSpeed" "1" Option "AccelerationProfile" "1" Option "AdaptiveDecelration" "16" Option "ConstantDecelration" "16" Option "VelocityScale" "1" EndSection
Have a look at the comments; on another box, I expect you'd need to fiddle with AreaTopEdge and AreaBottomEdge to find values convenient for you and your specific pad (the coordinates of the limits are most easily found in /var/log/Xorg.0.log). You may also want to play with FingerHigh, the pressure above which the device counts a click; on a clickpad, though, even for reasonable values you will click before you touch.
[1] | Synclient's quirks may not be its fault at all, but it is somewhat annoying that it lets you play with settings for circular pads (CircularScrolling, say) on devices that have no idea what these settings are, that you can set pressure sensitivity parameters (PressureMotionMinZ, PressureMotionMaxZ, PressureMotionMinFactor, PressureMotionMaxFactor) on pads that are, as I'm sure mine is after experimenting a lot, not pressure sensitive, or that it lets you set PalmDetect, PalmMinWidth, and PalmMinZ to absolutely no discernable effect. Ok, on the latter setting the synaptics man page does state that that needs firmware support. But really, if that's so, couldn't the non-supporting firmware be smart enough to not offer the setting in the first place if it does nothing? |