4

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)]
3

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.

  • +1 for get-button-map – comfreak Jan 12 at 8:42
2

You can easily get that middle 'button' to stop registering with a command like this:

xinput set-button-map 11 1 2 0 4 5 6 7 8 9 10 11 12

The first argument here specifies the device ID (in this case 11 based on your above posted output from xinput), while the rest map buttons to functions. The first two are the left and right buttons (with 1 and 2 being a regular click and the context menu), the third is the middle button (normally it would be set as 3, but 0 tells xinput to map it to nothing), while the rest cover other things (scrolling, etc).

Adjusting the other two buttons to cover the whole bottom of the pad is a bit trickier, and may actually not be possible. Clickpads like this one work by having a single switch under the pad that triggers the click, and then watching where the finger is on the pad to determine which button to register it as. There are three different ways this might be handled:

  1. In the firmware of the pad itself, without configuration options.
  2. In the firmware of the pad itself, with configuration options.
  3. In the userspace part of the driver.

The second method is only ever the case if the device is not connected over an old PS/2 style serial connection (yours probably is connected this way, most Thinkpads are like this). Synaptics does this using method 3, and offers lots of config options for almost everything. I'm not sure how Elantech handles it, but I would guess it's probably the first case unless it's a USB or I2C connected device, in which case it's technically the third even though I'm pretty sure they have no special input driver for X.

  • 1
    On my ThinkPad A485, running xinput get-button-map gives me 1 through 7 in ascending order. When I changed the third digit to 0, my right click was disabled, not the middle click. In my case the second digit was the middle click. However, I didn't set it to 0, but to 1, so now I don't have a dead space but rather an extended left click ;-) – comfreak Jan 12 at 8:40
0

Looks like order of buttons is Left Middle Right there. This worked for me.

xinput set-button-map 11 1 0 3 4 5 6 7

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.