You are not logged in.
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
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
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
I suggest this be Wikified
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
I suggest this be Wikified
http://wiki.archlinux.org/index.php/Logitech_MX
or perhaps in http://wiki.archlinux.org/index.php/Get … ns_Working
Indeed, a nice obvious place...I was perusing Google for this.
Offline
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
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