You are not logged in.

#1 2008-12-06 03:19:32

NobodySpecial
Member
Registered: 2007-04-12
Posts: 28

How to: MX Revolution

Many of us were using BTNX to run the buttons on the MX Revolution.  But BTNX is now broken with the new XORG.  The good news is, the new XORG is good enough that you don't really need BTNX, for the most part.

Here's how I use mine.
First, I'm not even using the evdev driver - I guess you could.  But "mouse" works fine:
/etc/X11/xorg.conf

Section "InputDevice"
    Identifier    "MX Rev"
    Driver        "mouse"
    Option        "CorePointer"
    Option        "Device"        "/dev/input/mice"
    Option        "Protocol"        "auto"
    Option        "ZAxisMapping"        "4 5"
    Option        "Emulate3Buttons"    "no"
    Option        "Buttons"        "3"
EndSection

To start, install a couple packages:

sudo pacman -S xbindkeys xvkbd

Then find the buttons you want with xev and enter in ~/.xbindkeysrc
My code under ~/.xbindkeysrc makes the thumb buttons go forward/back and also the middle mouse wheel rock left/right will change tabs in firefox:

"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
  m:0x0 + b:8
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
  m:0x0 + b:9
"/usr/bin/xvkbd -xsendevent -text "\[Control_L]\[Page_Up]""
  m:0x0 + b:6
"/usr/bin/xvkbd -xsendevent -text "\[Control_L]\[Page_Down]""
  m:0x0 + b:7

To automate, add /usr/bin/xbindkeys to System -> Pref -> Sessions.
Next, I like the left-sided wheel to rotate the desktop in compiz:
Compiz Settings -> Desktop -> Rotate Cube -> Bindings -> Initate "Button17", Rotate Left "Button13", Rotate Right "Button15"
Finally, its annoying to me that the middle button below the scroll wheel is set to "search".  Its far handier to have it as the middle mouse click.  The only way I found to do this is through Xmodmap, which isn't ideal, but works (PLEASE post here if you know a better way).
To list xmodmap keys: xmodmap -pk  OR  xmodmap -pke
Under xev above, my button gives "keycode 225", so I do this:

echo "keycode 225 = Pointer_Button2" >> ~/.xmodmaprc

Log out and in again - gnome should autodetect the ~/.xmodmaprc file.
The trick only works when "mousekeys" are on.
So either gnome-keyboard-properties -> Mousekeys -> Enable pointer OR toggle with SHIFT-ALT-NUMLOCK (you want to be able to toggle so you can use the numeric keypad at times).
However, the xmodmap trick has one more issue - it messes up keybindings in vmware.  This solved it for me:

su
echo "xkeymap.nokeycodeMap = true" >> /etc/vmware/config

If you know a better way to do any of this, please post.

Offline

#2 2008-12-09 08:24:36

WCentauri
Member
Registered: 2008-08-15
Posts: 2

Re: How to: MX Revolution

I suggest a slightly different way to handle the mapping of the search button to middle click.  The output from xev lists the button as XF86Search, and it can also be referenced as c:0xE1.  It should be possible to map the search button with xbindkeys by referring to c:0xE1 or XF86Search and using the xmacro package available in the AUR.  The corresponding entry for xbindkeys is

"echo 'ButtonPress 2 ButtonRelease 2' | xmacroplay :0"
c:0xE1

I'm not sure that xvkbd can remap mouse buttons.  Perhaps this is why xmodmap was used in the first place. xmacro can handle keyboard and mouse buttons, so the other entries in .xbindkeysrc could be transformed to xmacroplay calls.  I don't have a compelling reason (besides aesthetics) for doing so, other than anecdotal claims that xmacro has less overhead than xmacro.  This may or may not be true, and it may not matter for practical purposes anyway.

There is a big thread (http://ubuntuforums.org/showthread.php? … light=btnx) brewing on the Ubuntu forums about the death of btnx, and that is where this technique comes from.

Offline

#3 2009-02-17 03:34:24

Macdelaney
Member
Registered: 2008-11-24
Posts: 24

Re: How to: MX Revolution

I'm trying to find a way to use the media wheel to raise and decrease the volume, but can't find a way to do this using xvkbd. Anyone know how to do this?
I've tried setting a keyboard shortcut in gnome so that Control+Left  will raise the volume, and then added this to .xbindkeysrc

"/usr/bin/xvkbd -xsendevent -text "\[Control_L]\[Left]""
  m:0x0 + b:13

but I get this when I run "xbindkeys -n -v" and test it

Button press !
e.xbutton.button=13
e.xbutton.state=16
"/usr/bin/xvkbd -xsendevent -text "\[Control_L]\[Left]""
    m:0x0 + b:13   (mouse)
got screen 0 for window 13b
Start program with fork+exec call
Catch CHLD signal -> pid 14062 terminated
xvkbd: Mode_switch not available as a modifier
xvkbd: although ISO_Level3_Shift is used instead, AltGr may not work correctly
^[[1;5DButton release !
e.xbutton.button=13
e.xbutton.state=16

Last edited by Macdelaney (2009-02-17 03:52:05)

Offline

#4 2009-02-17 04:33:41

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: How to: MX Revolution

I suggest this be Wikified big_smile

http://wiki.archlinux.org/index.php/Logitech_MX
or perhaps in http://wiki.archlinux.org/index.php/Get … ns_Working

Last edited by Ranguvar (2009-02-17 04:33:58)

Offline

#5 2009-02-20 15:56:48

Skripka
Member
From: 2X1280X1024
Registered: 2009-02-19
Posts: 555

Re: How to: MX Revolution

Indeed, a nice obvious place...I was perusing Google for this.

Offline

#6 2009-07-28 16:10:33

alexsuraci
Member
Registered: 2008-09-27
Posts: 15

Re: How to: MX Revolution

I can't get mousekeys to stick around. I enable it in the XFCE accessibiltiy settings and I always have to disable it and re-enable it every 10 minutes or so. Anyone having the same problem?

Offline

#7 2009-07-28 23:37:34

alexsuraci
Member
Registered: 2008-09-27
Posts: 15

Re: How to: MX Revolution

Normally I'd wait a day before bumping but this is extremely annoying. Every 5 minutes I have to toggle the setting twice if I want to middle-click (which is very often). Isn't there some setting I can put in my xorg.conf file to keep it more permanent?

Note: It's literally stopping working after a certain period of time. I left it, working, and came back and it was broken again.

Last edited by alexsuraci (2009-07-29 00:02:12)

Offline

Board footer

Powered by FluxBB