How to disable hardware buttons of a touchpad?

>> xinput list

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ETPS/2 Elantech Touchpad                  id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ HP Truevision HD: HP Truevision           id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=10   [slave  keyboard (3)]
    ↳ HP WMI hotkeys                            id=12   [slave  keyboard (3)]

I want to disable the touchpad’s left physical button (button below the touchpad).

>> xinput list --long "ETPS/2 Elantech Touchpad"

ETPS/2 Elantech Touchpad                        id=11   [slave  pointer  (2)]
        Reporting 7 classes:
                Class originated from: 11. Type: XIButtonClass
                Buttons supported: 7
                Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right"
                Button state:
                Class originated from: 11. Type: XIValuatorClass
                Detail for Valuator 0:
                  Label: Rel X
                  Range: -1.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 11. Type: XIValuatorClass
                Detail for Valuator 1:
                  Label: Rel Y
                  Range: -1.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 11. Type: XIValuatorClass
                Detail for Valuator 2:
                  Label: Rel Horiz Scroll
                  Range: -1.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 11. Type: XIValuatorClass
                Detail for Valuator 3:
                  Label: Rel Vert Scroll
                  Range: -1.000000 - -1.000000
                  Resolution: 0 units/m
                  Mode: relative
                Class originated from: 11. Type: XIScrollClass
                Scroll info for Valuator 2
                  type: 2 (horizontal)
                  increment: 15.000000
                  flags: 0x0
                Class originated from: 11. Type: XIScrollClass
                Scroll info for Valuator 3
                  type: 1 (vertical)
                  increment: 15.000000
                  flags: 0x0

When I tried this:
>> xinput set-button-map 11 0 2 3 4 5 6 7

It also disabled tap to click.

Is there a way to disable the physical left button of the touchpad without disabling the tap to click as well?

Nope as tap-to-click simulates a left-button click…

You can do the reverse though! I.E. disable tap-to-click and leaving the left button intact by setting the hysteresis of the tap-to-click so high that it would take one of these to activate it:

:grin:

I thought it was possible since I manged to do it in Windows thru the driver’s settings. :thinking:

1 Like

Here is the driver’s settings on windows.

elan-touchpad-settings-win

That doesn’t mean anything: Linux is all about the hardware: if your hardware supports it, it’s supported. If your hardware doesn’t, it doesn’t…

E.G.

  • WiFi networks can be shared as a hotspot in Windows, but they can’t in Linux if your WiFi card cannot be set to Infrastructure mode: Windows “fakes it”
  • Left-click cannot be disabled on ElanTech, but can be on a Synaptic as there are 2 wires…

:sob:

I just tried Synaptics driver, left button doesn’t work anymore, which I want, but it can still accept hold event. :thinking:

I’ll try to look for disabling all the events passed to Left Button.

1 Like