Roland's homepage

My random knot in the Web

Xinput settings for Synaptics TouchPad

Detecting possible parameters. Updated for “styx”, a Lenovo ideapad 5

styx:~> xinput --list-props 11
Device 'MSFT0001:00 04F3:3140 TouchPad':
    Device Enabled (151):   1
    Coordinate Transformation Matrix (152):
    1.000000, 0.000000, 0.000000,
    0.000000, 1.000000, 0.000000,
    0.000000, 0.000000, 1.000000
    Device Accel Profile (271):     1
    Device Accel Constant Deceleration (272):       2.500000
    Device Accel Adaptive Deceleration (273):       1.000000
    Device Accel Velocity Scaling (274):    12.500000
    Synaptics Edges (313):  128, 3081, 113, 1984
    Synaptics Finger (314): 30, 50, 0
    Synaptics Tap Time (315):       125
    Synaptics Tap Move (316):       168
    Synaptics Tap Durations (317):  180, 180, 100
    Synaptics ClickPad (318):       1
    Synaptics Middle Button Timeout (319):  0
    Synaptics Two-Finger Pressure (320):    40
    Synaptics Two-Finger Width (321):       8
    Synaptics Scrolling Distance (322):     76, 76
    Synaptics Edge Scrolling (323): 1, 1, 0
    Synaptics Two-Finger Scrolling (324):   1, 1
    Synaptics Move Speed (325):     1.000000, 1.750000, 0.052178, 0.000000
    Synaptics Off (326):    0
    Synaptics Locked Drags (327):   0
    Synaptics Locked Drags Timeout (328):   5000
    Synaptics Tap Action (329):     0, 0, 0, 0, 1, 3, 2
    Synaptics Click Action (330):   1, 3, 2
    Synaptics Circular Scrolling (331):     1
    Synaptics Circular Scrolling Distance (332):    0.100000
    Synaptics Circular Scrolling Trigger (333):     2
    Synaptics Circular Pad (334):   0
    Synaptics Palm Detection (335): 1
    Synaptics Palm Dimensions (336):        10, 200
    Synaptics Coasting Speed (337): 0.000000, 50.000000
    Synaptics Pressure Motion (338):        30, 160
    Synaptics Pressure Motion Factor (339): 1.000000, 1.000000
    Synaptics Grab Event Device (340):      0
    Synaptics Gestures (341):       1
    Synaptics Capabilities (342):   1, 0, 0, 1, 1, 0, 0
    Synaptics Pad Resolution (343): 31, 31
    Synaptics Area (344):   0, 0, 0, 0
    Synaptics Soft Button Areas (345):      1604, 0, 1719, 0, 0, 0, 0, 0
    Synaptics Noise Cancellation (346):     19, 19
    Device Product ID (299):        1267, 12608
    Device Node (298):      "/dev/input/event6"

The capabilities indicate that this touchpad has: * has a left button, * two-finger detection, * three-finger detection.

It does NOT have * a middle button, * a right button, * pressure detection, * finger/palm width detection, * configurable vertical resolution, * configurable horizontal resolution.

In Xorg.0.log we can see the size of the pad:

styx:~> less /var/log/Xorg.0.log | grep -- -axis
(--) synaptics: MSFT0001:00 04F3:3140 TouchPad: x-axis range 0 - 3209 (res 31)
(--) synaptics: MSFT0001:00 04F3:3140 TouchPad: y-axis range 0 - 2097 (res 31)

I want three soft buttons. From the Arch Linux wiki:

> In the following example the right button will occupy the rightmost 40% of the
> button area and the middle button 20% of it in the center.
> The leftmost 40% remains as a left button (as does the rest of the clickpad):
Option     "SoftButtonAreas"  "60% 0 82% 0 40% 59% 82% 0"

Note that using xinput, you cannot use percentages, so:

  • 60% width = 1925
  • 82% height = 1719
  • 40% width = 1284
  • 59% width = 1893

This translates into the following xinput command:

xinput --set-prop "MSFT0001:00 04F3:3140 TouchPad" \
"Synaptics Soft Button Areas" \
"1925 0 1719 0 1284 1893 1719 ;w0"

That doesn’t work, however. So let’s try synclient:

synclient RightButtonAreaLeft=1925
synclient RightButtonAreaRight=0
synclient RightButtonAreaTop=1719
synclient MiddleButtonAreaRight=1893
synclient MiddleButtonAreaLeft=1284
synclient MiddleButtonAreaTop=1719
synclient MiddleButtonAreaBottom=0

Note that if I try to set MiddleButtonAreaLeft before MiddleButtonAreaRight, I get an X error.

Setting it in the configuration works, though. Configuration fragment for the touchpad, /usr/local/etc/X11/xorg.conf.d/touchpad.conf:

Section "InputClass"
    Identifier "MSFT0001:00 04F3:3140 TouchPad"
    Driver "synaptics"
    MatchIsTouchpad "on"
        Option "TapButton1" "1"
        Option "TapButton2" "3"
        Option "TapButton3" "2"
        Option "VertEdgeScroll" "on"
        Option "VertTwoFingerScroll" "on"
        Option "HorizEdgeScroll" "on"
        Option "HorizTwoFingerScroll" "on"
        Option "CircularScrolling" "on"
        Option "CircScrollTrigger" "2"
        Option "EmulateTwoFingerMinZ" "40"
        Option "EmulateTwoFingerMinW" "8"
        Option "CoastingSpeed" "0"
        Option "FingerLow" "30"
        Option "FingerHigh" "50"
        Option "MaxTapTime" "125"
        Option "PalmDetect" "on"
        Option "SoftButtonAreas" "1925 0 1719 0 1284 1893 1719 0"
EndSection

For comments, please send me an e-mail.


Related articles


←  Switching vim to use native package management Xinput settings for Kensington Expert Mouse  →