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 !!!"
@luudee
Copy link

luudee commented Apr 16, 2019

This was very helpful! Thank you for sharing this info!

@techraed
Copy link

techraed commented May 25, 2019

That really helped

@medievalhellspawn999
Copy link

My left click typically ends up a double click. This does not always happen but 50%. I have read many people having the debounce mouse click issue but none of the solution seems to work for my R.A.T. 7

@angelexevior
Copy link

My left click typically ends up a double click. This does not always happen but 50%. I have read many people having the debounce mouse click issue but none of the solution seems to work for my R.A.T. 7

check dmesh and usb device info for your R.A.T. cyborg and mad catz R.A.T.7's are identical as hardware but have different identifiers in firmware. You may need to change the name of it in xorg.conf depending if its a cyborg or madcatz firmware.

If you find out you've got the old cyborg model, try this after you've performed the above installation of Xorg:
Modify xorg.conf. Append the following section to /usr/share/X11/xorg.conf
(in a terminal, enter pkexec gedit /usr/share/X11/xorg.conf):

Section "InputClass"
Identifier "Mouse Remap"
MatchProduct "Saitek Cyborg R.A.T.7 Mouse"
MatchDevicePath "/dev/input/event*"
Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 0 0 0 0 0 0"
EndSection

Good luck

@SebastianJL
Copy link

Thanks for sharing. This works great.

@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