3

I use a Lenovo X250 with Debian. I have a touchpad with 3 physical buttons on top. Using xev I can see that these correspond to buttons 1, 2, and 3. Additionally, the touchpad itself can be pressed. Pressing it with one finger generates a button 1 event, pressing it with two fingers generates an event for button 3.

I would like to swap buttons 1 and 3 since I am left handed. This can be done by calling:

 xmodmap -e "pointer = 1 2 3"

This has the desired effect for the physical buttons on top, however, it unfortunately also swaps the events generated by the touchpad click. So, now a one fingered click generates an event for button 3 and a two fingered click generates an event for button 1.

Is there anyway to swap the physical buttons but leave the touchpad click intact?

  • What driver are you using for the touchpad (/var/log/Xorg.log)? If synaptics, you can configure the buttons generated by the touchpad click (xorg.conf or xinput, man synaptics). – dirkt Jun 22 '17 at 18:45
  • Run xinput list to find the touchpad device name or ID then xinput list-props "touchpad device name or ID" to list properties that you can change with xinput set-prop. Setting one or more property may allow you to do what you want. – Gilles 'SO- stop being evil' Jun 23 '17 at 1:02
  • 1
    I am using synaptics. I looked through the documentation. It seems that TapButton1-3 and ClickFinger1-3 are the most likely candidates. I've tried setting them via synclient, but they don't seem to change anything. Do I need to restart something after setting them? – oneself Jul 5 '17 at 20:16
  • i think you can setup this at the desktop level (kde/gnome) on the setting panel if you are using one of those – intika Jan 16 at 8:59
  • I don't use kde or gnome. I use xmonad which has poor settings support. – oneself Jan 17 at 20:21
1

After more research, I discovered that the right way to do this is via xinput.

My Lenovo laptop has both a TrackPoint and Touchpad and their names tend to change over time depending on the driver I use. It is important to ensure that you set the right device. For me this is the TrackPoint. It can be set to left handed operation using the following command:

xinput set-prop "$(xinput list --name-only | grep -i 'trackpoint')" "libinput Left Handed Enabled" 1

This flips button 1 and 3 but leaves the pad click on button 1. This can be verified with the xev command.

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.