Message: previous - next
Month: September 2017

Re: [trinity-users] map buttons kensington 4 button mouse

From: "Dr. Nikolaus Klepp" <office@...>
Date: Wed, 6 Sep 2017 10:54:53 +0200
Hi Greg!

> Kensington Expert Mouse:
> Lots of info on the net about this mouse, have tried modifying xorg,
> .xinitrc, .xmodmap per instructions, button mapping code.
>  No changes to the button assignment. Control center has a three button
> mouse tool, it works for 3 of the 4 buttons.

I happen to use the same mouse :-)

The 4th button is button 8, you can use "xev" or "xbindkeys -k" to verify. I have used xbindkeys to map 4th button to "nextDesktop": 

# ~/.xbindkeysrc
"dcop twin KWinInterface nextDesktop"

You can also use "xinput" to modify the button assignment - I prefer this method to fiddling with Xorg settings. Here is an example from my .xinitrc for Aiptec tablet, changes button 1 to button 13:

# AIPTEK SlimTablet Pendown (Button 1) auf Button 13 mappen
ID=$(xinput list|grep WALTOP|sed 's/^.*=\([0-9]*\).*$/\1/')
xinput set-button-map $ID 13

For Kensington to swap button 8 and button 4:

$ xinput set-button-map $(xinput list | grep "Kensington Expert Mouse" | sed 's/^.*=\([0-9]*\).*$/\1/') 1 2 3 8 5 6 7 4 

More details about your mouse - funny that it claimes to have 12 buttons:

$ xinput list --long $(xinput list | grep "Kensington Expert Mouse" | sed 's/^.*=\([0-9]*\).*$/\1/')


Please do not email me anything that you are not comfortable also sharing with the NSA, CIA ...