I am using a Logitech Anywhere Mouse MX on my Ubuntu. Mouse works well, but I can't assign the actions to the extra buttons available on it. What I miss the most is the "back" and "forward" actions assigned to the scroll wheel tilt left and right.
How can I activate these features?
I have this same mouse, and I wanted to bind the two buttons on the side of the mouse to forward and back. Here is how I solved this:
1) Use the utility "xev" to determine what numbers the buttons you are wanting to remap correspond to. You may have to install this package using
Once xev is installed type "xev" into a terminal, and an X window that is white with a black box will pop up. Moving your mouse into that window will begin registering events to the terminal. Reading the output of that carefully will tell you the numbers of your mouse buttons. On my mouse, the left and right tilt map to buttons 6 and 7 respectively.
2) Now we are going to use the utility "xbindkeys" to remap the mouse buttons to key presses. If you don't already have this installed you may have to install it with
3) Create a file in your home directory called ".xbindkeysrc". This is what xbindkeys will read to see what you are remapping. The contents of my .xbindkeysrc file are:
So this tells my computer to send the keyboard button presses "Alt+Left" or "Alt+Right" to the system using the virtual keyboard (xvkbd) whenever button 8 on mouse 0 is pressed or button 9 on mouse 0 is pressed respectively. These keys correspond to the the forward and back keys in most applications. This will work, for example, in Nautilus, chrome/
Note: you may need to install
xvkbd
if not already present on your system.sudo apt-get install xvkbd
I use
xbindkeys
in combination withxdotool
.Create a
.xbindkeysrc
file in your home directory. It must contain:However with VMware you don't have to do anything else except adding
to the .vmx file in your host system. It's what VMware opens every time you start your guest system.
Here is what I did. No
sudo
commands or new packages necessary:xev
--> all buttons correspond to a certain value, which means they are recognized by the systemxinput list
--> the mouse is listed with ID 9 in my casexinput list-props 9
shows current mapping and especially tells about button labels --> seems like foreward / backward corresponds to button 8 and 9 which I do not have (wheel tilt is 6 and 7 and mapped to horizontal scrolling)xmodmap
as interpreted by X is most convenient solution for me. First five buttons should not be changed (left right middle click and scolling up and down), but those reporting as button 6 & 7 should navigate foreward / backwardxmodmap -e "pointer = 1 2 3 4 5 8 9 6 7 10 11 12 13 14 15 16"
in a terminal swaps buttons 6 and 7 with 8 and 9 (virtually)xmodmap -e "pointer = default"
and try a different mappingman xmodmap
to store this command in a file called~/.xmodmaprc
or append the instruction to~/.bashrc
Worked for me. Hope this helps.
This is what worked for me:
1) Install xbindkeys
2) Install xautomation
3) Create a file .xbindkeysrc in your home directory with this inside:
4) Go to Startup Applications and add program with xbindkeys command.
5) Log out & log in
Source: Ubuntu Forums
Easystroke is, well easy to configure.