Linux

Logitech MX Mouse Special Buttons Ubuntu Config

The Logitech MX mouse is truly a great mouse. And this is coming from someone who is old school and doesn’t see the point in these fancy expensive toys. But once you use the MX and configure it to some of the shortcuts you use on your keyboard, you’ll never look back.

Anyway, this is how I got it configured it to my liking on Ubuntu 12.04:

1. Install xbindkeys

sudo apt-get install xbindkeys

2. Create the config file

xbindkeys --defaults > $HOME/.xbindkeysrc

3. My config file looks like this
Just copy and paste my config into the config file and you’re set!

gedit $HOME/.xbindkeysrc
# For the benefit of emacs users: -*- shell-script -*-
###########################
# xbindkeys configuration #
###########################
#
# Version: 1.8.5
#
# If you edit this file, do not forget to uncomment any lines
# that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# To specify a key, you can use 'xbindkeys --key' or
# 'xbindkeys --multikey' and put one of the two lines in this file.
#
# The format of a command line is:
#    "command to start"
#       associated key
#
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier:
#   Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
#   Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#

# The release modifier is not a standard X modifier, but you can
# use it if you want to catch release events instead of press events

# By defaults, xbindkeys does not pay attention with the modifiers
# NumLock, CapsLock and ScrollLock.
# Uncomment the lines above if you want to pay attention to them.

#keystate_numlock = enable
#keystate_capslock = enable
#keystate_scrolllock= enable

# Examples of commands:

#"xbindkeys_show"
#  control+shift + q

# set directly keycode (here control + f with my keyboard)
#"xterm"
#  c:41 + m:0x4

# specify a mouse button
#"xterm"
#  control + b:2

#"xterm -geom 50x20+20+20"
#   Shift+Mod2+alt + s
#
## set directly keycode (here control+alt+mod2 + f with my keyboard)
#"xterm"
#  alt + c:0x29 + m:4 + mod2
#
## Control+Shift+a  release event starts rxvt
#"rxvt"
#  release+control+shift + a
#
## Control + mouse button 2 release event starts rxvt
#"rxvt"
#  Control + b:2 + Release

# Back
"xte 'keydown Alt_L' 'key Left' 'keyup Alt_L'"
  b:8
# Forward
"xte 'keydown Alt_L' 'key Right' 'keyup Alt_L'"
  b:9

# Expo
"xte 'keydown Super_L' 'key s' 'keyup Super_L'"
  b:10

# Expo
#"xte 'keydown Control_L' 'key w' 'keyup Control_L'"
"xte 'mouseclick 2'"
  b:13 + Release

##################################
# End of xbindkeys configuration #
##################################

4. Install xte

sudo apt-get install xautomation

5. Add xkindkeys to Startup by going to System Settings > Startup Applications and complete it like so:

6. Restart

twitterredditpinterestlinkedinmail

Leave a Comment

Your email address will not be published. Required fields are marked *