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)]
  • hi i also want to make it 1111 3333 equally currently i get is 1111 1133 . any idea how you solved it
    – Santhosh
    May 23, 2022 at 5:48
  • All the solutions listed here are for Xorg. For wayland, some solutions here. Jun 6, 2023 at 21:30

5 Answers 5


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.

  • 5
    type xinput list for a list of devices if you don't know your touchpad name by heart
    – Kerem
    Dec 9, 2019 at 14:12
  • 1
    If you prefer a more "visual" solution, install GNOME Tweaks, open it, go to the Keyboards & Mouse tab, then in the Mouse Click Emulation section click the option Fingers. Optionally if you also want to disable the middle click for pasting in the console (at least for me is really annoying), in the same tab disable Middle Click Paste. Nov 5, 2021 at 12:31
  • Note that the first number above (13 in this example, x in Adam Smith's answer) is the id of the device. There will be a column of ids when you run xinput list. Ignore Mariano Ruiz's comment; Tweaks doesn't have an option that does what we in this thread want. Oct 17, 2023 at 13:52

Once you've figured out which number corresponds to which button, you can replace middle-click with left-click.

In my case, the second number mapped to middle-click:

1 2 3 4 5 6 7

So this replaces it with left-click:

xinput set-button-map x 1 1 3 4 5 6 7

Where x is the id obtained from xinput

  • 1
    This worked the best for me - if the sequence is 1 0 3 etc then there is a a dead area of the touchpad! So mapping middle-click to left-click is very sensible, thanks.
    – drkvogel
    Dec 7, 2021 at 23:27
  • This is perfect -- it just maps the middle section of the trackpad to left-click. This way you get a 2/3 width left click, and a 1/3 width right click (all the way in the right corner) which matches expectations. thanks!
    – trisweb
    Mar 14, 2023 at 18:45

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.

  • 4
    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, 2019 at 8:40
  • @comfreak Came to this post 2 and a bit years later, and the exact same for my Legion Y470S. also had 1 - 7 as my xinput, and 2 was my middle click, so setting it to 1 gives me the extended left click. +1 for you!
    – Chris S
    Apr 29, 2021 at 22:57

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
  • Same here for the X1 Sep 29, 2020 at 10:17
  • 1
    Same issue here for T14, the order of the buttons was different. You can check the order with xinput list DEVICE_ID
    – Risse
    Dec 25, 2020 at 10:20

1. Find the ID

of your touchpad with xinput list:

$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=12   [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)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C           id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=10   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=13   [slave  keyboard (3)]

Apparently, the one called "... TouchPad" has id=11.

2. Get the buttom map

with the ID:

xinput get-button-map 11
1 2 3 4 5 6 7 

3. Try to set a new button map

Now you have to use trial and error to figure out the meaning of the button map. You can typically assume that 1 is the left-click-action. The first thing to try is to guess that the second position is the bottom middle button. Replace it with left click action (1):

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

4. Check that it works

Thanks to Adam's answer (which inspired this one) I only needed one try to get the result I wanted:

|                 |
|                 |
|                 |
|                 |
|11111 11111 33333|
|11111 11111 33333|

That is, the left two thirds of the bottom stripe act as the left button while the right third acts as the right button.

5. What if it doesn't work?

Try replacing other parts of the button map with the key 1 similar to step 3. See how the touchpad reacts. If you can't get the desired result, reset the button map to what you obtained in step 1, to get back the original behaviour.


I ran this on a ThinkPad T570 but it should be applicable to most touchpads.

  • Hands down the best answer and explanation! Sep 29, 2023 at 6:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .