Logitech mx mouse zoom button middle click on Ubuntu

Any good engineer has their own tools of their trade: keyboard, mouse, and licenses to their favorite editors (oh and a badass chair).

I work now on an Ubuntu box and I wanted to get my logitech MX mouse’s zoom button to act as middle click. I really like this functionality since its easy to copy, paste, close windows, and open new links with this button.

However, the button mapping in Ubuntu isn’t trivial. On windows you used the setpoint program to do it and called it a day. But in linux land you need to put more work into it.

Here is a great tutorial describing how to do it, but for the lazy, here is the mapping you need.

"xte 'mouseclick 2'"

What this says is “when button 13 is clicked, then released, issue a mouseclick 2 command”. xte is a program that simulates mouse and keyboard events, and xbindkeys (whose config you edit to set the xte mapping) is a program that lets you bind one key or mouse event to another key or mouse event.

Once I did this and started up xbindkeys then my zoom button (button 13) now worked as middle click (mouseclick 2).

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>