Configure Lenovo Thinkpad X240 trackpad in Linux Mint

Posted by Martin Vilcans on 10 April 2014

I recently got a new laptop, and (as usual) it was a Lenovo Thinkpad. This time I wanted an Ultrabook, so I chose the X240. I'm a fan of the red pointing stick of Thinkpads as it allows me to move the mouse without moving my hands from the keyboard. Unfortunately, on the X240 there are no physical mouse buttons, except that the whole trackpad serves as one big pushbutton.

Lenovo Thinkpad X240 trackpad

After installing Linux Mint, I had problems clicking, as when I clicked on the trackpad, it also registered as a mouse movement, so I had no precision at all when clicking.

The red markings on the trackpad suggest the top part of the trackpad is supposed to be used as buttons. If you buy it with a pre-installed OS, it's probably configured that way out of the box, but I neither wanted nor got a pre-installed OS, so I figured out how to set it up in Linux Mint. (The following probably applies to many other distros such as Ubuntu.)

Just copy the following to /usr/share/X11/xorg.conf.d/52-thinkpad.conf:

Section "InputClass"
  Identifier "Fixing clickpad buttons"
  MatchDriver "synaptics"

  # Use the top area of the trackpad as mouse buttons.
  # The meaning of these eight values are:
  # Right button: left, right, top, bottom
  # Middle button: left, right, top, bottom
  Option "SoftButtonAreas" "60% 0 0 5% 40% 60% 0 5%"

  # Don't use the top of the trackpad for mouse movement
  Option "AreaTopEdge" "5%"

This reserves the top 5% of the trackpad to be used for left, middle and right mouse buttons, while the rest of the trackpad can be used for moving the mouse pointer.

You'll have to restart X for the settings to have an effect.

For more information about the settings possible in this configuration file, run man synaptics.

This was based on Gabriel SaldaƱa's blog post about Debian on Lenovo Thinkpad X240 which got the information from Luigi Massa Gallerano's How to configure new Lenovo x240 touchpad on Ubuntu 13.10.

They propose editing an existing file (50-synaptics.conf), but as that file's header says that it may be overwritten by updates, I thought it was safer (and easier) to put it in a separate file.

Previous: Avoid pull/merge mess in Git
Next: Class diagrams as notes to self

blog comments powered by Disqus