Sunday, 24 June 2012

Cyborg R.A.T 3 Linux Mouse Glitch


Today I finally got round to taking back my faulty Roccat Kova, which broke a couple weeks back when the USB connector fell apart. As per usual the store didn’t have a replacement model to give me so I decided to pay the extra £5 and “upgrade” to the Cyborg R.A.T 3.

Cyborg R.A.T 3
First impressions were excellent. Moves smoothly on all surfaces I tested (Gaming Mat, Normal Mat, Gloss Surface, Cloth Surface) , despite what I read in other reviews, and the feel once you get used the the “small and fat” design is actually rather good especially if you have bigger hands.
However after about 5 minutes of use under openSuSe 11.3 x64 Gnome I discovered an appearently common problem that never came up in my review research. It freezes and locks onto the open window and worse yet locks out all other mice attached, as well as Alt+Tab.
After some fiddling around with xev I discovered the root of the problem is the Mode key does not have a release button command after being sent, (well technically it does but only even 3rd press). I presume that is to allow the button combo feature you can config in Windows.  After mapping out the keys they turned out to be numbered as follows :-
1 – Left Click, 2 – Wheel Click, 3 – Right Click, 4 – Scroll Up, 5 – Scroll Down, 6 – Unknown, 7 – Unknown, 8 – Forward Side, 9 – Backward Side, 10/11/12 – Mode Button, 13 – Unknown, 14 – DPI Down
Button numbers 6,7 & 13 are unknown.
In order to fix the issue all we have to do is disable the offending keys (10+) from registering.
So open /etc/X11/xorg.conf in your favorite text editor (I use vi) as root, and enter the following, the file should be empty but if not add at the top.

Section "InputClass"
Identifier "Mouse Remap"
MatchProduct "Saitek Cyborg R.A.T.3 Mouse"
MatchDevicePath "/dev/input/event*"
Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 0 0 0 0 0"
EndSection
Change the MatchProduct to the name returned for the mouse by xinput –list.
This should work for all version of the R.A.T but simply working though all the buttons inxev looking for ones that don’t give a ButtonRelease event when you let them go and replacing that buttons number with a 0 in the Option “ButtonMapping” field.
This same theory should also work for the other R.A.T models (5,7,9) if you simply use xevto test which buttons don’t return a release and then replace the button mapping option with the list you create.  If anyone does map the 5,7, or 9 then I would be happy to know so I can update this post with the mapping list of each of them. :)

No comments:

Post a Comment