Commit Graph

174 Commits

Author SHA1 Message Date
nia
9c80624b1c synaptics: Emulate scrolling when the middle button is held with TrackPoints
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.
2020-10-01 17:13:19 +00:00
nia
cd04adbbd6 erect a signpost for weary travellers 2020-10-01 15:08:11 +00:00
nia
3810cfde80 comment was likely true in 2007 but no longer reflects the reality of hw 2020-10-01 14:33:26 +00:00
nia
9c5979c439 Canadian French keyboard layout for ukbd/pckbd 2020-07-13 09:44:48 +00:00
nia
d123e17c63 Add keyboard layout for Latin American Spanish to ukbd/pckbd 2020-07-13 08:45:12 +00:00
nia
b9acad4106 Add Icelandic keyboard layout to ukbd/pckbd. 2020-07-12 14:31:49 +00:00
nia
07a5a11827 Add Estonian layout as a variation of Swedish for ukbd and pckbd 2020-07-12 12:13:05 +00:00
nia
573b8ee484 Bring br.nodead closer to X11 2020-07-12 01:44:24 +00:00
nia
68477093d7 Add support for the Brazilian keyboard layout to pckbd and ukbd.
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
2020-07-12 01:35:59 +00:00
nia
e78dab04ee synaptics: Don't reset the device multiple times in succession
Cherrypicked from a patch from an anonymous contributor.
2020-05-14 18:06:58 +00:00
jmcneill
f80d38fbd5 pms_synaptics_enable: no need to send PMS_DEV_ENABLE here because
pms_enable does this for us. Seems to resolve issues with my trackpoint
not working immediately after starting X on ThinkPad X260.
2020-04-28 19:22:58 +00:00
jmcneill
4e1981f9d6 Extended buttons are reported separate from touchpad buttons, so track
button press / release state separate from touch events.
2020-04-27 22:31:47 +00:00
nia
27bd329625 synaptics: Maintain the left/right buttons when up/down are remapped
Reported on current-users by Mandacarú Cascavel
2020-03-31 19:08:19 +00:00
nia
b532442005 synaptics: Revert changes that broke gestures in cases where they worked.
It seems I have to figure out another way to make scrolling work for me.
2020-03-27 11:10:07 +00:00
nia
c140c33a55 synaptics: Increase default scale_z for more precise scrolling 2020-03-16 11:13:19 +00:00
nia
e1ecc07c09 synaptics: Check for single-finger event jitter in all cases.
I now have smooth two-finger scrolling.
2020-03-15 22:44:32 +00:00
nia
45b25aba3e synaptics: Detect multiple fingers outside the gesture period
I suspect this code doesn't make any sense if we want two-finger scrolling
2020-03-14 22:23:17 +00:00
nia
c2eda7b18a synaptics: Automatically scroll when multiple fingers are detected
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?
2020-03-14 21:56:08 +00:00
nia
f192d2dd5d synaptics: fix syntax 2020-03-14 21:23:32 +00:00
nia
ea7b97b6b2 synaptics: Allow the max_speed sysctls to be set 2020-03-14 21:18:50 +00:00
nia
dd302e79dd synaptics: Set up_down_emulation=3 by default.
It's a less surprising default for modern hardware.
2020-03-14 19:29:39 +00:00
nia
6fe7b60978 synaptics: Make up_down_emulation useful for single-button clickpads
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.
2020-03-14 13:08:18 +00:00
ryoon
34b05ae8e7 Messages in pms_synaptics_input() should not start with "pms_input"
Use "pms_synaptics_input" instead for another 2 messages.
2020-02-25 21:41:38 +00:00
ryoon
2fce724e2a Messages in pms_synaptics_input() should not start with "pms_input"
Use "pms_synaptics_input" instead.
2020-02-25 21:38:42 +00:00
ryoon
38b76fc7a8 Do not enter extended W mode conditional for non extended W mode device
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.
2020-02-25 21:36:13 +00:00
ryoon
ec28725d9d Remove a trailing tab. 2020-02-25 16:24:47 +00:00
ryoon
eb3a0a30dd Introduce hw.alps.touchpad_movement_threshold to better button area clicks 2020-02-10 16:12:58 +00:00
ryoon
0b1d31ee04 Fix typo in sysctl node name 2020-02-10 15:29:05 +00:00
nia
b91e2921c9 Support the combination of KB_SWAPCTRLCAPS and UK layout. 2020-01-11 21:43:10 +00:00
chs
d47bcd296c in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
2019-11-10 21:16:21 +00:00
jmcneill
6a84c46fd2 pckbd_cngetc: Set type=0 and return if no data is available 2019-07-23 12:28:52 +00:00
nakayama
62fb785605 hvkbd requires pckbd_keydesctab in wskbdmap_mfii.c. 2019-07-22 09:58:39 +00:00
mlelstv
cdb8872cc5 Resynchronizing the input stream could infinitely wait when the touchpad
is in the wrong (relative) mode. The detection of relative mode is never
reached.

Limit the resynchronization to 6 bytes, then trigger a reset.
2019-07-05 05:09:24 +00:00
blymn
881d45ecbd Changes based on code from an anonymous contributor. This should make
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.
2019-06-02 08:55:00 +00:00
msaitoh
39c3181ae1 s/recieve/receive/ 2019-05-28 08:59:33 +00:00
blymn
538588e8e1 Modify driver to use bits(3) to extract capabilities. Thanks to
Anon Ymous for the fix.
2019-04-22 00:53:59 +00:00
blymn
6466910224 Fix minor comment nit. 2019-04-21 02:40:35 +00:00
ryoon
e386a026df Support more ALPS V2 devices
* The V2 devices found in Toshiba dynabook satellite B551/D and
  dynabook SS RX1/T8E.
2019-03-16 03:27:15 +00:00
blymn
d52750232e * Increase the default scaling of the two finger scroll to make it
less sensitive
* Fix range check for hw.synaptics.scale_z so it can be set with sysctl
2018-12-04 10:10:15 +00:00
blymn
ee3d5db25b * Increase minimum finger width to prevent entering scroll mode erroneously
* 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.
2018-11-28 09:14:03 +00:00
blymn
abbf616b9b Add double finger scroll feature. If the detected width is between a
defined range then report y movement as z-axis.  Effectively emulating
a mouse scroll wheel.
2018-11-06 09:13:17 +00:00
blymn
335eb92c0e Fix clamping of deltas so it works for both positive and negative deltas. 2018-11-06 08:55:02 +00:00
maya
b7f7faa3f0 Send the 'magic reverse engineered sequence' with a single sliced command,
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.
2018-07-14 00:47:33 +00:00
maya
cead564c24 Add comment elaborating what a sliced command is. 2018-07-13 19:44:08 +00:00
uwe
c9265f9539 Make the error message from pms_alps_probe_init() an error again now
that we don't misidentify almost anything as an ALPS device.  Reset if
E6 check failed as well.
2018-06-19 23:25:59 +00:00
uwe
8d0c8bff34 Don't pass response buffer to the reset command since we are not
interested in it (pckbport_poll_cmd() is smart enough).
2018-06-19 23:03:28 +00:00
uwe
2b77c4cdd5 If the first byte of E7 signature is not 0x73, it's not an ALPS
device, so don't complain we failed to initialize it.  Still need a
reset, b/c the E7 check will be interpreted as normal commands by a
normal device.
2018-06-19 22:53:17 +00:00
uwe
13f76e26c2 When E6 signature is checked, ignore pressed buttons. 2018-06-19 21:47:28 +00:00
uwe
cd9108c6ed Use PMS_SEND_DEV_STATUS for E9 instead of PMS_GET_SCALE (also defined
as E9).  This is more readable and is congruent with other drivers.
Same object code is generated.
2018-06-19 21:21:04 +00:00
christos
ce6d9321cf restore \n printing. 2018-06-03 15:10:12 +00:00