The Logitech MX Revolution is my favorite mouse of all time. So good in fact, that when I heard it was being discontinued, I bought three of them. Unfortunately, getting this mouse to work under Linux is not so straightforward. At first, it was easy to configure using btnx, but now that's been discontinued as well. After a quick google search, I was able to get most of the buttons working, but the middle/search button turned out to be a pain to configure.
It turns out that The MX Revolution is seen by the OS as two separate devices. One of them is a typical mouse, but the other is some kind of keyboard emulation. I think they did this so that the search button would work out of the box in MS Windows. Is it really that necessary to have a search button on your mouse? Maybe it's just me, but I can't imagine it being that useful. I prefer to use it as a middle mouse button.
These are the necessary steps to achieve this:
- Remove the default binding for the button. To do this, go to Settings > keyboard > launchers > search and remove it.
-
Install the necessary tools:
sudo apt-get install xbindkeys xdotool
-
Create default config file
xbindkeys --defaults > ~/.xbindkeysrc
-
Comment out all example bindings in the file and add this:
# Middle mouse button "xdotool mousedown 2" XF86Search "xdotool mouseup 2" Release + XF86Search
-
You know how if you press and hold most keys on the keyboard, the key will be sent multiple times? We need to disable this using xset:
xset -r 225
The number 225 is the keycode for the search button. We are excluding it from the auto repeating keys.
And that's it! You now have a working middle mouse button for your Logitech MX Revolution.
No comments:
Post a Comment