Thread (8 messages) 8 messages, 4 authors, 2012-03-01

Re: Logitech MX5500 Bluetooth mouse middle 'button' does not work

flat view

From: Eric Paris <hidden>
Date: 2012-03-01 15:15:07

On Thu, Mar 1, 2012 at 8:47 AM, Bastien Nocera [off-list ref] wrote:
On Thu, 2012-03-01 at 08:39 -0500, Eric Paris wrote:
quoted
On Wed, Feb 29, 2012 at 4:37 PM, jonsmirl@gmail.com [off-list ref] wrote:
quoted
On Wed, Feb 29, 2012 at 4:00 PM, Eric Paris [off-list ref] wrote:
I think working on the kernel's fried your brain Eric ;)
You seem to mistakenly believe my brain was ever not fried...
xinput needs an X display. udev doesn't know that display. You can
instead use Jon's script with this, if you use GNOME 3:
http://who-t.blogspot.com/2011/03/custom-input-device-configuration-in.html

More examples at:
http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/common/input-device-example.sh
So obviously I don't know how to get the scroll wheel click to work,
but remapping the thumb buttons works great!  Thanks so much everyone!
 /me wonders how long it will take to remember how to set this up
after next reinstall.

$ gsettings set org.gnome.settings-daemon.peripherals.input-devices
hotplug-command $HOME/scripts/input-devices.sh
$ cat /home/eparis/scripts/input-devices.sh
#!/bin/sh

args=`getopt "t:i:" $*`

set -- $args

while [ $# -gt 0 ]
do
    case $1 in
    -t)
        shift;
        type="$1"
        ;;
     -i)
        shift;
        id="$1"
        ;;
     --)
        shift;
        device="$@"
        break;
        ;;
    *)
        echo "Unknown option $1";
        exit 1
        ;;
    esac
    shift
done

retval=0

case $type in
        added)
		# Forward/Back thumb buttons to 'middle' click
		if [ "$device" = "Logitech MX Revolution Mouse" ]; then
        		/usr/bin/xinput set-button-map "$device" 1 2 3 4 5 6 2 2 >>
/tmp/logitech 2>&1
		fi
		;;
        present)
		# Forward/Back thumb buttons to 'middle' click
		if [ "$device" = "Logitech MX Revolution Mouse" ]; then
        		/usr/bin/xinput set-button-map "$device" 1 2 3 4 5 6 2 2 >>
/tmp/logitech 2>&1
		fi
                ;;
        removed)
                ;;
        *)
                echo "Unknown operation"
                retval=1
                ;;
esac

# All further processing will be disabled if $retval == 0
exit $retval
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help