Skip to content

Instantly share code, notes, and snippets.

@pubkey
Last active January 18, 2024 09:44
Show Gist options
  • Save pubkey/31ef83263bb5451ff904304d161f40e2 to your computer and use it in GitHub Desktop.
Save pubkey/31ef83263bb5451ff904304d161f40e2 to your computer and use it in GitHub Desktop.
Mad Catz R.A.T. 7/9 on Linux ubuntu/mint
#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 !!!"
@KorshikovRoman
Copy link

Thank you very match

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