Skip to content

Instantly share code, notes, and snippets.

@pbuckley4192
Created August 1, 2019 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbuckley4192/62d421be60b0dc82609c24c1493a537e to your computer and use it in GitHub Desktop.
Save pbuckley4192/62d421be60b0dc82609c24c1493a537e to your computer and use it in GitHub Desktop.
#The mouse will suck on linux because of the programmable buttons.
#This script will change the button-delegation so that the mouse doesn't stuck.
#@link https://community.linuxmint.com/hardware/view/10217
#sudo mkdir /etc/X11/xorg.conf.d
sudo rm /etc/X11/xorg.conf.d/910-rat.conf
# add the following to the file
echo "Section \"InputClass\"" >> /etc/X11/xorg.conf.d/910-rat.conf
echo "Identifier \"R.A.T.\"" >> /etc/X11/xorg.conf.d/910-rat.conf
echo "MatchProduct \"R.A.T.7|R.A.T.9\"" >> /etc/X11/xorg.conf.d/910-rat.conf
echo "MatchDevicePath \"/dev/input/event*\"" >> /etc/X11/xorg.conf.d/910-rat.conf
echo "Option \"Buttons\" \"17\"" >> /etc/X11/xorg.conf.d/910-rat.conf
echo "Option \"ButtonMapping\" \"1 2 3 4 5 0 0 8 9 7 6 12 0 0 0 16 17\"" >> /etc/X11/xorg.conf.d/910-rat.conf
echo "Option \"AutoReleaseButtons\" \"13 14 15\"" >> /etc/X11/xorg.conf.d/910-rat.conf
echo "Option \"ZAxisMapping\" \"4 5 6 7\"" >> /etc/X11/xorg.conf.d/910-rat.conf
echo "EndSection" >> /etc/X11/xorg.conf.d/910-rat.conf
# esc, then wq!
# reboot
#sudo reboot now
echo "done"
echo "!!! Please reboot so the settings can work !!!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment