SolidHal / PrawnOS

Libre Mainline Kernel and Debian for arm laptops
https://www.PrawnOS.com
GNU General Public License v2.0
114 stars 29 forks source link

synaptics touchpad right button is not working on c100 (veyron minnie), c201 (veyron speedy) #286

Open cracket opened 3 years ago

cracket commented 3 years ago

I have noticed the right button is emulating left button. After some research my attention was drawn by https://github.com/SolidHal/PrawnOS/blob/master/filesystem/packages/prawnos-xfce-config/src/30-touchpad.conf

which has no entry for synaptics and using libinput only. This is strange, because with x11 comes package xserver-xorg-input-synaptics which provides driver synaptics_drv.so and sample configuration in /usr/share/X11/xorg.conf.d/70-synaptics.conf (but with commented out device which makes this driver disabled by default).

Anyway I have replaced in /etc/X11/xorg.conf.d/30-touchpad.conf section for touchpad to:

Section "InputClass"
        Identifier              "touchpad catchall"
        Driver                  "synaptics"
        MatchIsTouchpad         "on"
        MatchDevicePath         "/dev/input/event*"
        Option                  "TapButton1" "1"
        Option                  "TapButton2" "2"
        Option                  "TapButton3" "3"
        Option                  "EmulateThirdButton" "1"
        Option                  "EmulateThirdButtonTimeout" "750"
        Option                  "EmulateThirdButtonThreshold" "30"
EndSection

and now magically right touchpad button has started working.

I am not sure if this using libinput with generic settings (one button only) was caused by some gestures features in libinput, but haven't noticed any problems with changed synaptics driver yet.

gregordinary commented 1 year ago

Installed latest PrawnOS from pre-built image, selected XFCE for DE.

Observed Behavior:

  1. Physical Left Click: Left Click
  2. Physical Middle Click: N/A
  3. Physical Right: N/A
  4. Tap with one finger: Select
  5. Tap with two fingers: Right Click
  6. Tap with three fingers: Middle Click
Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "Tapping" "on"
        Option "ClickMethod" "clickfinger"
        Option "DisableWhileTyping" "on"
EndSection

The observed behavior is consistent with the Option "ClickMethod" "clickfinger" libinput configuration. This is intended to mimic Apple touchpad behavior. Laptops and other devices like the C201 which do not have physically separate left, middle, and right-click buttons must be software-defined to get the left, middle, and right clicks when the touchpad is physically clicked in the corresponding region.

Changing "ClickMethod" to "buttonareas" will mimic the behavior of physical left, middle, and right-clicks. If you want just left and right physical clicks on the touchpad and the middle click to be emulated, you can also add Option "MiddleEmulation" "true".

Updating the touchpad section of /etc/X11/xorg.conf.d/30-touchpad.conf to:

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "Tapping" "on"
        Option "MiddleEmulation" "true"
        Option "ClickMethod" "buttonareas"
        Option "DisableWhileTyping" "on"
EndSection

Gets the following Behavior:

  1. Physical Left Click: Left Click
  2. Physical Middle Click: N/A
  3. Physical Right Click: Right Click
  4. Tap with one finger: Select
  5. Tap with two fingers: Right Click
  6. Tap with three fingers: Middle Click

Since right click technically exists in both configurations either via two-finger tap or a physical right click, this might be a configuration preference prompted to end users.

Side note, you can also change the scrolling behavior here too with: Option "NaturalScrolling" "true": natural (reverse) scrolling Option "ScrollMethod" "edge": edge (vertical) scrolling