Difference between revisions of "Mad Catz Mouse"

From ArchWiki
Jump to navigation Jump to search
m (typo)
(Moved mouse model settings in separate section + some)
Line 102: Line 102:
  
 
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'.
 
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'.
 
  
 
Example:
 
Example:
Line 113: Line 112:
 
Where buttons 10, 11, and 12 have been identified as 'mode' buttons, so they can be disabled by with zeros.
 
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 {{ic|xorg.conf}} file and disable them by inserting a zero in the appropriate point in the button sequence.
  
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:
+
Open in your chosen editor:
  
 
  /etc/X11/xorg.conf  or
 
  /etc/X11/xorg.conf  or
  /etc/X11/xorg.conf.d/50-vmmouse.conf
+
  /etc/X11/xorg.conf.d/910-rat-xx.conf
  
Create a block that overwrites the mode buttons as follows:  
+
Create a block that overwrites the mode buttons as listed for your mouse model in chapter '''Mouse Configurations''':
  
 
MadCatz R.A.T.3:
 
MadCatz R.A.T.3:
Line 131: Line 131:
 
  EndSection
 
  EndSection
  
This configuration worked for me on my old Saitek Cyborg R.A.T.3:
+
=Mouse Configurations=
 +
 
 +
It is recommended that you put those settings in a single file for each model you use, eg. {{ic|/etc/X11/xorg.conf.d/920-rat-mmo7.conf}}.
 +
 
 +
== Mad Catz R.A.T. 5==
 +
 
 +
Section "InputClass"
 +
    Identifier "Mad Catz R.A.T. 5"
 +
    MatchProduct "Mad Catz Mad Catz R.A.T.5 Mouse"
 +
    MatchDevicePath "/dev/input/event*"
 +
    Option "Buttons" "21"
 +
    Option "ButtonMapping" "1 2 3 4 5 0 0 9 8 7 6 10 0 0 0 0 0 0 0 0 0"
 +
    Option "ZAxisMapping" "4 5 11 10"
 +
    Option "AutoReleaseButtons" "13 14 15"
 +
EndSection
 +
 
 +
==Mad Catz M.M.O.7==
  
# RAT3 mouse
 
 
  Section "InputClass"
 
  Section "InputClass"
   Identifier "Mouse Remap"
+
   Identifier "Mouse Remap 7"
   MatchProduct "Saitek Cyborg R.A.T.3 Mouse"
+
   MatchProduct "Mad Catz Mad Catz M.M.O.7 Mouse|M.M.O.7"
   MatchDevicePath "/dev/input/event*"
+
   MatchIsPointer "true"
   Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 0 0 0 13 14"
+
  MatchUSBID "0738:1713"
 +
  Driver "evdev"
 +
  Option "Buttons" "24"
 +
   Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 0 21 22 23 24"
 +
  Option "AutoReleaseButtons" "20"
 +
  Option "ZAxisMapping" "4 5 6 7"
 
  EndSection
 
  EndSection
  
This works for a Mad Catz R.A.T.TE:
+
==Mad Catz R.A.T. TE==
  
 
  Section "InputClass"
 
  Section "InputClass"
Line 151: Line 171:
 
  EndSection
 
  EndSection
  
This configuration worked for a Mad Catz R.A.T.5: Create the file '''/etc/X11/xorg.conf.d/rat5.conf''' with the following content (source: [http://www.bpaulin.net/articles/linux/2014/05/16/mad-catz-rat5-avec-linux/]):
+
==Mad Catz M.M.O. TE==
  
 
  Section "InputClass"
 
  Section "InputClass"
    Identifier "Mad Catz R.A.T. 5"
+
  Identifier "Mouse Remap TE"
    MatchProduct "Mad Catz Mad Catz R.A.T.5 Mouse"
+
  MatchProduct "Mad Catz Mad Catz M.M.O.TE"
    MatchDevicePath "/dev/input/event*"
+
  MatchIsPointer "true"
    Option "Buttons" "21"
+
  MatchUSBID "0738:1714"
    Option "ButtonMapping" "1 2 3 4 5 0 0 9 8 7 6 10 0 0 0 0 0 0 0 0 0"
+
  Driver "evdev"
    Option "ZAxisMapping" "4 5 11 10"
+
  Option "Buttons" "24"
    Option "AutoReleaseButtons" "13 14 15"
+
  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" "20"
 +
  Option "ZAxisMapping" "4 5"  
 +
  Option "ConstantDeceleration" "2"
 
  EndSection
 
  EndSection
  
To work correctly, it is important to that you identify the correct "ButtonMapping" and "MatchProduct" for your specific mouse.
+
==Saitek Cyborg R.A.T.3==
  
For any any modifications to xorg.conf take effect, X must be restarted.
+
# 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"
 +
EndSection
  
 
== Use extra mouse buttons with Wine/Games ==
 
== Use extra mouse buttons with Wine/Games ==

Revision as of 14:25, 15 October 2019

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.

Installation

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

Note: On some systems the MatchProduct string may vary, therefore, you can use the command xinput list

Issues

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

  • You cannot move windows around when grabbing the window's title bar. (happens with Openbox and other Window manager)
  • You cannot click on buttons.
  • You cannot get the focus on windows.
  • You cannot open menus, even with keyboard shortcuts.
  • Display does not refresh (using Xcompmgr)
  • 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"
EndSection

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

RAT7 or RAT9 Partial Fix

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

  • Does not fix the change-profile button for RAT9, this profile needs more adjustment or just do not push it.

/etc/X11/xorg.conf.d/910-rat.conf:

Section "InputClass"
  Identifier "Mouse Remap"
  MatchProduct "Mad Catz Mad Catz M.M.O.7 Mouse|M.M.O.7"
  MatchIsPointer "true"
  MatchUSBID "0738:1713"
  Driver "evdev"
  Option "Buttons" "24"
  Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 0 21 22 23 24"
  Option "AutoReleaseButtons" "20"
  Option "ZAxisMapping" "4 5 6 7"
# Option "Resolution" "3200"
# Option "ConstantDeceleration" "2"
EndSection

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'.

Example:

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
/etc/X11/xorg.conf.d/910-rat-xx.conf

Create a block that overwrites the mode buttons as listed for your mouse model in chapter Mouse Configurations:

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"
EndSection

Mouse Configurations

It is recommended that you put those settings in a single file for each model you use, eg. /etc/X11/xorg.conf.d/920-rat-mmo7.conf.

Mad Catz R.A.T. 5

Section "InputClass"
   Identifier "Mad Catz R.A.T. 5"
   MatchProduct "Mad Catz Mad Catz R.A.T.5 Mouse"
   MatchDevicePath "/dev/input/event*"
   Option "Buttons" "21"
   Option "ButtonMapping" "1 2 3 4 5 0 0 9 8 7 6 10 0 0 0 0 0 0 0 0 0"
   Option "ZAxisMapping" "4 5 11 10"
   Option "AutoReleaseButtons" "13 14 15"
EndSection

Mad Catz M.M.O.7

Section "InputClass"
 Identifier "Mouse Remap 7"
 MatchProduct "Mad Catz Mad Catz M.M.O.7 Mouse|M.M.O.7"
 MatchIsPointer "true"
 MatchUSBID "0738:1713"
 Driver "evdev"
 Option "Buttons" "24"
 Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 0 21 22 23 24"
 Option "AutoReleaseButtons" "20"
 Option "ZAxisMapping" "4 5 6 7"
EndSection

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"
EndSection

Mad Catz M.M.O. TE

Section "InputClass"
 Identifier "Mouse Remap TE"
 MatchProduct "Mad Catz Mad Catz M.M.O.TE"
 MatchIsPointer "true"
 MatchUSBID "0738:1714"
 Driver "evdev"
 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" "20"
 Option "ZAxisMapping" "4 5"    
 Option "ConstantDeceleration" "2"
EndSection

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"
EndSection

Use extra mouse buttons with Wine/Games

Install evrouterAUR and add your user to input group and relogin to activate changes.

# gpasswd -a <user> input

Edit the evrouter config file and change the `eventX` number to the event number the mouse uses with

$ evrouter --dump /dev/input/event*

Then assign any hotkeys to any mouse button. Preferably use not often used keystrokes to not interfere with others already used as in the example Right Shift + F-key.

~/.evrouterrc
# 10
"Mad Catz Mad Catz M.M.O.7 Mouse" "/dev/input/event9" none key/277 "XKey/Shift_R+F1"
# 11
"Mad Catz Mad Catz M.M.O.7 Mouse" "/dev/input/event9" none key/278 "XKey/Shift_R+F2"

Start with:

$ evrouter /dev/input/event*

Stop with:

$ evrouter -q && rm -f /tmp/.evrouter*

R.A.T. configuration software

Saitek/Mad Catz does not provide any official configuration software for Linux.

There is however open an source project which allows you to configure DPI settings for each and mode here.

It might however require some tweaking for certain R.A.T. mice, such as adding your mouse ID to the list of supported IDs.

See also