Mad Catz Mouse

From ArchWiki
Revision as of 10:52, 19 February 2015 by Physicist1616 (talk | contribs) (Manually ButtonMapping Fix: Title adjustment)
Jump to navigation Jump to search

Mad Catz produces a series of gaming mice, for example the Saitek Cyborg R.A.T.3 Mouse (7 buttons USB wired) or the R.A.T9 (7 buttons USB wireless). The mice do not work properly in X without some reconfiguration. This article explains how to make it work with any desktop manager.


No driver installation is required. The mouse should be detected at boot or whenever it is hot-plugged.


After being plugged, the mouse will seems to work, but you may experience different issues :

  • You can't move windows around when grabbing the window's title bar. (happens with Openbox and other Window manager)
  • You can't click on buttons.
  • You can't get the focus on windows.
  • You can't open menus, even with keyboard shortcuts.
  • Display doesn't refresh (using Xcompmgr or Cairo Compmgr)
  • Closing certain windows restores functionality until the mouse locks into a new window.

The Disable Button Solution

The issues are caused by an interaction between R.A.T Mode button and the X Server. To restore proper function, the 'Mode' button must be disabled, as follows:

With root privileges, create and edit the file /etc/X11/xorg.conf.d/50-vmmouse.conf (see xorg).

Add the following content :

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "evdev"
    Option         "Name" "Saitek Cyborg R.A.T.3 Mouse"
    Option         "Vendor" "06a3"
    Option         "Product" "0ccc"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/input/event4"
    Option         "Emulate3Buttons" "no"
    Option         "Buttons" "7"
    Option         "ZAxisMapping" "4 5"
    Option         "ButtonMapping" "1 2 3 4 5 6 7 0 0 0 0 0 0 0"
    Option         "Resolution" "3200"

After restarting your X server, the mouse should be fully functional, including the two lateral buttons. If not, or if you need more informations about configuring gaming mice, see All Mouse Buttons Working.

RAT7 or RAT9 Full Fix

This is the configuration file that will get your R.A.T. 7 or R.A.T. 9 mouse working properly under linux.


Section "InputClass"
 Identifier "Mouse Remap"
 MatchProduct "Mad Catz Mad Catz M.M.O.7 Mouse"
 MatchIsPointer "true"
 MatchDevicePath "/dev/input/event*"
 Option "Buttons" "24"
 Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24"
 Option "AutoReleaseButtons" "13 14 15"
 Option "ZAxisMapping" "4 5 6 7"

You can define different keystrokes applied to each mouse button by defining them in ~/.xbindkeysrc eg.:

# pressing mouse button 7 sends keystroke: 2
"xvkbd  -text 2"
       m:0x0 + b:7
# pressing mouse button 8 sends keystroke: Space
"xvkbd  -text "\[SPACE]""
       m:0x0 + b:8
# pressing mouse button 9 sends keystroke: F8
"xvkbd  -text "\[F8]""
       m:0x0 + b:9
# pressing mouse button 10 sends keystroke: CursorLeft
"xvkbd  -text "\[Left]""
       m:0x0 + b:10
# pressing mouse button 11 sends keystroke: Shift+F2
"xvkbd  -text "\[Shift]\[F2]""
       m:0x0 + b:11

A very good article on setting up the Mad Catz M.M.O.7 mouse with Linux is written here.

Manual Button Mapping Fix

Please note that there are two different versions of the R.A.T.3 mouse which are Saitek and Madcatz, this must be input correctly into the "MatchProduct" or you will run into the same issues.

First find out the ID and the Name of the mouse :

xinput list | grep "id"

In you should see your mouse labeled as "Madcatz Mad Catz R.A.T.3 Mouse" or "Saitek Cyborg R.A.T.3 Mouse". Note the device id number and then input the following command :

xinput query-state ID

(Where ID corresponds to the ID number of your mouse)

Note which 'mode' color is currently active (red/blue/purple) and which button numbers correspond to the current 'mode' by being either "up" or "down". Change the mouse 'mode' and and retype the above command, noting which buttons change state to match the 'mode'.


U = up
D = down
                        U U U U U D D U U D D D  U  U 
Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 0 0 0 13 14"

Where buttons 10, 11, and 12 have been identified as 'mode' buttons, so they can be disabled by with zeros.

When you have identified which button numbers correspond to the mouse 'Modes', you should be able to edit your xorg.conf file and disable them by inserting a zero in the appropriate point in the button sequence. Open in your chosen editor:

/etc/X11/xorg.conf   or

Create a block that overwrites the mode buttons as follows:

MadCatz R.A.T.3:

# RAT3 mouse
Section "InputClass"
 Identifier "Mouse Remap"
 MatchProduct "Madcatz Mad Catz R.A.T.3 Mouse"
 MatchDevicePath "/dev/input/event*"
 Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 0 0 0 13 14 15 16 17 18"

This configuration worked for me on my old Saitek Cyborg R.A.T.3:

# RAT3 mouse
Section "InputClass"
 Identifier "Mouse Remap"
 MatchProduct "Saitek Cyborg R.A.T.3 Mouse"
 MatchDevicePath "/dev/input/event*"
 Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 0 0 0 13 14"

This works for a Mad Catz R.A.T.TE:

Section "InputClass"

   Identifier     "Mouse Remap"
   MatchProduct   "Mad Catz Mad Catz R.A.T.TE"
   MatchDevicePath "/dev/input/event*"
   Option         "ButtonMapping" " 1 2 3 4 5 6 7 8 9 10 11 12 0 0 0"
   Option        "ZAxisMapping" "4 5 6 7"


To work correctly, it's important to that you identify the correct "ButtonMapping" and "MatchProduct" for your specific mouse.

For any any modifications to xorg.conf take effect, X must be restarted.

See also