Disabling middle click on bottom of a clickpad / touchpad

mousethinkpadtouchpadx11xinput

The Thinkpad T480s has a "clickpad": a touchpad where (parts of) the touchpad itself is pressable instead of having physical dedicated buttons.

Running X.org 7.7, there is a horizontal stripe at the bottom of the touchpad that acts as the mouse buttons 1, 2, and 3 (i.e. left, middle and right); basically it looks like this:

+-----------------+
|                 |
|                 |
|                 |
|                 |
|11111 22222 33333|
|11111 22222 33333|
+-----------------+

How do I disable button 2 and reallocate that area to between buttons 1 and 3? I.e. I would like the following layout:

+-----------------+
|                 |
|                 |
|                 |
|                 |
|11111111 33333333|
|11111111 33333333|
+-----------------+

Note this question is different from mtrack: how to get vertical button zones? since I am trying to do this in the context of XInput, not mtrack. Also, the hardware is not Synaptics.

The hardware in question is identified by XInput as

⎡ 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)]
⎜   ↳ ETPS/2 Elantech TrackPoint                id=12   [slave  pointer  (2)]

Best Answer

If I type:

$ xinput get-button-map 'DLL07BF:01 06CB:7A13 Touchpad'

I get: 1 2 3 4 5 6 7

I tried using:

$ xinput set-button-map 13 1 2 0 4 5 6 7

It disabled middle and right click.

Related Question