idea stolen from various other operating systems.
this configurable with a sysctl in case somebody wants to hold the middle
button, e.g. with old window managers that close menus when a button is
released.
This is significantly different from the European Portugese layout,
and was pieced together from Wikipedia, X11 layout files, and to
some extent with trial and error.
Thanks to lun-4 for helping test this.
PR kern/44570
This will mean we automatically get two-finger scrolling on multitouch
pads.
This works, but the scrolling is janky. Why does it eventually move the
mouse cursor (only one finger detected, but two are still there), and why
does it jump up slightly?
On devices such as the Thinkpad X250, the clickpad can be pressed
to generate mouse button events 1 and 2. There are also additional
physical buttons which the pms(4) driver recognizes as "up/down" buttons
(mouse buttons 3 and 4). Allow these to be remapped to buttons 1 and 2
and used like normal touchpad buttons with the following sysctl:
# sysctl -w hw.synaptics.up_down_emulation=3
While here, adjust the existing "middle button emulation"
(hw.synaptics.up_down_emulation=1) so it works with single-button
clickpads.
XXX: 3 may be a more useful default than the current default,
depending on hardware availability of touchpads with "up/down buttons".
Update the documentation accordingly.
Even without extended W mode, sp_w can be 2. This causes
"invalid extended w mode N" warning messages.
Restrict extended W mode conditional for hardwares with extended W
support.
Tested with Synaptics 6.2 device on Panasonic CF-Y8, however it does
not work with X.
trackpads work for Thinkpads. Also adds code to handle externally
connected buttons (synaptics parlance), the first five are mapped to
mouse buttons 1-5. The rest are currently not reported but could be
decoded if required.
* Attempt to clarify what the sysctl variables for finger scroll do
* Add hysteresis to validity check so changing it does not get rejected
Thanks to Martin Husemann and Michael van Elst for reporting the issues.
don't wait for individual ACKs. Fixes kern/53444.
While here:
- use better descriptive names for functions
- use a function for the extended write command
- add macro for number from the old synaptics documentation
- don't get the resp from the command sequence if we're going to ignore
it anyway
most from uwe.