Skip to content

Instantly share code, notes, and snippets.

@benburrill
Last active September 2, 2018 20:02
Show Gist options
  • Save benburrill/38d80499c7d14d5211e4d949f9b556af to your computer and use it in GitHub Desktop.
Save benburrill/38d80499c7d14d5211e4d949f9b556af to your computer and use it in GitHub Desktop.
I hate touchpad middle click
Section "InputClass"
Identifier "libinput touchpad custom"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
# Map the first two buttons (normally left click and middle click) to both be left click
# so that 2/3 of the touchpad is devoted to left click and 1/3 to right click.
# I'm not sure, but probably on a 2 button touchpad this would eliminate right click, so
# be aware.
Option "ButtonMapping" "1 1"
EndSection

Custom touchpad xorg config

Maps a 3-button touchpad so that button 2 (default: middle click) becomes left click. This makes random pasting of the x selection or closing tabs you meant to switch to much less likely.

Installation instructions

Install file to the /usr/share/X11/xorg.conf.d/ directory and restart.

You'll need libinput for it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment