Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Last active October 17, 2022 06:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miguelmota/2d5bd7721d77b37e4ec466969645dc5b to your computer and use it in GitHub Desktop.
Save miguelmota/2d5bd7721d77b37e4ec466969645dc5b to your computer and use it in GitHub Desktop.
Arch linux disable trackpad (touchpad) middle click on ThinkPad T480
$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Raydium Corporation Raydium Touch System id=9 [slave pointer (2)]
⎜ ↳ Synaptics TM3276-022 id=13 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=14 [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=10 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=11 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=12 [slave keyboard (3)]
$ xinput get-button-map 13
1 2 3 4 5 6 7
# https://unix.stackexchange.com/a/438800/108077
# 0 index = device id
# 1 index = left click
# 2 index = middle click
# 3 index = right click
# here's were setting index 2 (middle click) to match index 1 (right click) so there is no empty gap when clicking.
# the rest are other buttons and scrolling.
$ xinput set-button-map 13 1 1 3 4 5 6 7
# add to startup script
$ echo "xinput set-button-map 13 1 1 3 4 5 6 7" >> ~/.xinitrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment