Search This Blog

Tuesday, July 10, 2018

Mad Catz Config for Linux

One of my favorite computer mice is the Mad Catz R.A.T. 7.  I really enjoy all the features (mode buttons, forwards and backwards, size and weight customization) and it really helps speed up the workflow even in non-gaming use cases.  However, when using Debian, I encountered an issue in which the xorg display server causes the mouse to malfunction; it becomes unable to click, move, and select.  To recover from this state, one would usually have to restart the X Display Server - this method is very irritating.
After some research, I came across a solution from the Arch Linux Wiki.  Although you may have a different distro, the underlying issue is X's problems with extra buttons such as the mouse's mode button, not the operating system (I performed the fix on Debian).
First, get the exact name of the mouse with this command: xinput list | grep "id"
Please note that although this command works for most cases, you may need to check the system logs for the exact and correct device name.  Also, it is normal for "Mad Catz" to be repeated twice in the device name.  Then, with root privileges, create (or append to) a file in /etc/X11/ called xorg.conf.  Paste the following text in it (replace the name in quotes for MatchProduct with the name you received from xinput):

Section "InputClass"
    Identifier "Mouse Remap"
    MatchProduct "Mad Catz Mad Catz R.A.T.7 Mouse"
    MatchIsPointer "true"
    MatchDevicePath "/dev/input/event*"
    Option    "Buttons" "24"
    Option    "ButtonMapping" "1 2 3 4 5 0 0 8 9 10 11 12 0 0 0 16 17 7 6 0 0 0 0 0"
    Option    "AutoReleaseButtons" "20 21 22 23 24"
    Option    "ZAxisMapping" "4 5 6 7"

Now, restart your X server and your Mad Catz R.A.T. mouse should start working!  I will be posting a follow-up soon on configuring more options with this mouse in Linux soon.

No comments:

Post a Comment