geekhack

geekhack Community => Input Devices => Topic started by: N8N on Mon, 24 October 2011, 16:38:28

Title: RAT7 problem in Ubuntu - window focus?
Post by: N8N on Mon, 24 October 2011, 16:38:28
Got the RAT7 in the mail today... just unboxed it about 10 mins. ago.  Seems like there is a known bug in Ubuntu.  This might end up being my at-work mouse, but I'd like to have the option of using it on my favorite OS at home as well.

1) the pinky shelf is AWESOME.

2) it's unusable on Ubuntu at least with GNOME - when the RAT is plugged in - even if I'm using a different mouse - I can't change focus off the current window, or access any of the bar/menu commands.  The buttons do work as e.g. I can change tabs in Firefox.

I'm going to do some basic googling and see if there's anything out there (I bet there is) but if anyone has a quick fix please let me know, because this thing feels GREAT in my hand... love it so far.  It showed up with all the weights installed, all I did was install the pinky rest and the taller palmrest, I really want to give this thing a test drive.  It looks like an unholy marriage between a mouse and a Transformer, but you guys didn't lead me astray... feels fantastic and at least initially my impression of the quality is good, I like the way the buttons and scroll wheel feel (scroll wheel is important to me as I do use it a lot.)
Title: RAT7 problem in Ubuntu - window focus?
Post by: N8N on Mon, 24 October 2011, 16:46:25
never mind... found it

https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/615892

there's an explanation in the thread, but the short version is as follows (quoting from a post in the thread)

Steps to get RAT 7 working:

1) Open terminal

2) Type (without quotes) "sudo gedit /etc/X11/xorg.conf" (Enter password if needed)

3) In the text file that opens up, add this to the bottom:

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 2 9 10 11 12 0 0 0"
EndSection

4) Save file

5) Restart computer (or just restart the X server if you know how)

6) Use mouse!

Above solution is based on Mitch Walker's comment #17.

still love the way it feels.  Quick movement will take some getting used to.

Edit: discovered the DPI adjustment setting.  Happy!  Now I know there's no drivers for Linux but if I could get the thumb wheel to do side scrolling that would be *awesome*
Title: RAT7 problem in Ubuntu - window focus?
Post by: Clickey on Mon, 24 October 2011, 23:12:49
Be warned about RAT mice, I had 3 RAT 5's and all stopped tracking properly after a couple of months. I have had many different products made by their parent company (madcatz) and they all failed prematurely.
Title: RAT7 problem in Ubuntu - window focus?
Post by: N8N on Tue, 25 October 2011, 05:50:47
I'll keep it in mind, I bought this one (and the Logitech I also bought to try) used because I wasn't really sure what I would end up liking...

I'm still trying to get the stupid thumb scroll wheel working...  does anyone know how to make it scroll side-side like nudging the scroll wheel on a Logitech does?  I figured out which "buttons" it is and have them currently bound to alt-pgup and alt-pgdn and that is functional but I'd rather have real side scrolling for spreadsheets and CAD work...
Title: RAT7 problem in Ubuntu - window focus?
Post by: Daniel Beaver on Tue, 25 October 2011, 07:52:38
Ugh... adjusting mouse settings on Linux is a painful experience.
Title: RAT7 problem in Ubuntu - window focus?
Post by: N8N on Tue, 25 October 2011, 12:45:27
yeah, I almost need a working Logitech mouse to figure how to do this.

Unfortunately searching for this issue online seems to imply that the thumb wheel does NOT do side scrolling in Windows... which is a problem.  This might spoil for me a mouse that I've otherwise found wonderful so far.  I have not installed the drivers yet because I'm a little hesitant to do so on a work computer, so I haven't actually tried it.
Title: RAT7 problem in Ubuntu - window focus?
Post by: N8N on Sun, 27 May 2012, 15:11:23
I just had to redo this because I've updated my Ubuntu since I last used the RAT on Linux

I don't know why, but the above info I gave was incorrect.  My only excuse is that I copied the code from a web site, tried it, it seemed to work (but I did not test it extensively,) then I promptly took the RAT to work and used it exclusively on Windows until today.  The following are the lines that actually need to be added to your xorg.conf to make this work correctly.

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 10 11 12 0 0 0"
EndSection

8 and 9 are your back and forward buttons (the thumb buttons on the RAT) don't know why the info that I gave previously mapped one of those to 2 which is pointless.  In any case this works fine now, although I forget now how I got the thumb wheel to work nicely.  If anyone's ever figured out how to get it to do proper side scroll let me know.

BTW 10 and 11 are the thumb wheel ; 12 is the "snipe" button.

Full button assignments:

1: left mouse button
2: center mouse button (down press on scroll wheel)
3: right mouse button
4: scroll up
5: scroll down
6: not used
7: not used
8: side back
9: side forward
10: thumb wheel right
11: thumb wheel left
12: "snipe"

I think that the whole point of going through this exercise is that the button that selects the mode when using this under Windows with the provided drivers needs to be disabled (I'm guessing it's probably Button 13) to prevent the window focus problem.

Now on my Logitech mouse pushing the scroll wheel left is Button 6 and pushing it right is Button 7.  Hmmm....  getting an idea here!  Will report back as soon as I try something and test it.

Edit: Here ya go.  To change the mappings to make the thumb wheel work like the side scroll on a Logitech mouse, HERE is the correct xorg.conf entry.

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

Basically, if you're not following what I did here, I remapped "button 10" to "button 7" and "button 11" to "button 6."  Haven't figured out what to do with Button 12 (snipe) yet, but I just opened up a spreadsheet in LibreOffice and tried the thumb wheel/side scroll and it works just like I want it to.  Enjoy.