Logitech MX Master and Linux

Logitech’s MX Master is perhaps one of the best mice available at the moment. Supporting both Bluetooth and the Unifying Receiver, loads of buttons, a vertical scroll wheel and micro-usb rechargable battery, it’s hard to go wrong with this thing. Unfortunately, the default key mappings on my linux desktop (Gnome 3) are terrible. The thumb button doesn’t do anything, and the vertical scroll does god knows what.

Keyboard Setting to Change to get Expose Thumb

The vertical scroll button is a little harder to configure. Personally, I want the vertical scroll to do page zooming.

In Fedora 23, I had to install the following packages:

  $ sudo dnf install xautomation xbindkeys

xbindkeys is a daemon that lets you remap keybindings. xautomation contains xte, which is a little app that let’s you emulate keystrokes. Using the two, we can remap the mouse buttons to simulate

and give xbindkeys the following config:

somewhere inside ~/.xbindkeysrc

   "xte 'keydown Control_L' 'keydown Shift_L' 'key plus' 'keyup Shift_L' 'keyup Control_L'"
  "xte 'keydown Control_L' 'key minus' 'keyup Control_L'"

I’m emulating ctrl+shift+plus for Zoom out in order to respect the default Zoom Out bindings for nautilus. All the browsers I use also support the binding so it so it’s works out well. Zoom-in doesn’t need it for some reason.

You can try this configuration by running xbindkeys in a terminal. It should daemonize, but will not run on restart. Fedora doesn’t have this working with systemd out of the box, so I had to improvise to get this working on login. I made a desktop file in ~/.config/autostart


  [Desktop Entry]
    Comment=Autostart xbindkeys for custom mouse/keybindings

I really like this setup. I’ve also gotten into the habit of pairing the mouse via bluetooth to my desktop computer for a slightly smoother mousing experience compared to the sometimes laggy Unifiying Receiver. Now if only they’d bake in bluetooth with their K800!


Doug Hatcher

I'm a developer from Charleston, SC. I like technology, movies, and dabble in Star Trek fandom.

Read More