Page MenuHomeFreeBSD

psm: detect Lenovo top-button clickpads, set INPUT_PROP_TOPBUTTONPAD evdev property
ClosedPublic

Authored by val_packett.cool on Dec 28 2018, 8:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 21, 7:27 AM
Unknown Object (File)
Mon, Oct 20, 8:28 PM
Unknown Object (File)
Sun, Oct 19, 6:09 PM
Unknown Object (File)
Sun, Oct 19, 6:09 PM
Unknown Object (File)
Sun, Oct 19, 4:03 AM
Unknown Object (File)
Aug 3 2025, 1:24 PM
Unknown Object (File)
Aug 2 2025, 4:45 PM
Unknown Object (File)
Jun 29 2025, 5:51 PM
Subscribers

Details

Summary

libinput has special handling for Lenovo ThinkPad *40 series, where it treats clicks on the top button area as if they came from the TrackPoint:
https://wayland.freedesktop.org/libinput/doc/latest/t440-support.html

Let's detect these devices and set the corresponding evdev property.

Test Plan

Tested on my X240.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Please assign hw.psm.synaptics.softbuttons_y sysctl some negative value so /dev/psm0 users get benefits from this change too.

Added softbuttons_y value for topbuttonpads.

Looking at r313757, I used to set softbuttons_y to -1700. Makes sense, the regular value is 1700.

BTW, looking back at my old notes from when I still used Xorg, xf86-input-synaptics with /dev/psm0 did its own synaptics-specific handling of button zones, configurable via Xorg.conf:

Option      "SoftButtonAreas" "4201 0 0 1950 2710 4200 0 1950"
Option      "AreaTopEdge" "5%"

I hope -1700 value is tested. It does not work for my "softbuttons bar at a bottom" laptop leaving softbutton area outside reportable region so I have to use -2200 to make it working. But "softbuttons bar at a top" touchpad should behave differently here.

This revision is now accepted and ready to land.Dec 30 2018, 2:57 PM
In D18676#398820, @wulf wrote:

I hope -1700 value is tested.

Yes. I've had the value in my sysctl.conf for a couple years now. Just started moused to test in vt, the middle button at the top does paste :)

This revision was automatically updated to reflect the committed changes.