Samstag, 31. Januar 2015

More Mice Stuff

My good old Logitech MouseMan Dual Optical got some problems. Pushing buttons yields in no-click, single-click or double-click. It is a typical long time use wearout. 


 Finally I got me a new mouse: a Logitech Trackman Marble.

Different. Right?
I tried it on Windows and …
Installed SetPoint software from Logitech. Works. But the special scroll options (push one of the smaller buttons and use the ball to scroll) won't work e.g. in games.
Searching around I found XMouseButtonControl which sets the buttons much better. Click and hold to scroll. And it even works in-game. Why isn't the manufacturer able to do that?

And then I tried the TrackMan on Linux. Plug-and-Play. Works. (And much faster then on Windows ^__^ ) Still I needed to set up the buttons. There are special pages for Ubuntu and Arch.

First I played around with the xinput thing and made a script:

xinput set-button-map "Logitech USB Trackball" 1 8 3 4 5 6 7 2 9Emulation Button" 9
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation" 8 1
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation Button" 8 8
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation Axes" 8 6 7 4 5
And then a little configuration for X11 lying
/usr/share/X11/xorg.conf.d/50-marblemouse.conf or
Section "InputClass"
    Identifier "Marble Mouse"
    MatchProduct "Logitech USB Trackball"
    MatchIsPointer "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    Option "SendCoreEvents" "true"

    Option "Buttons" "9"
    Option "ButtonMapping" "1 8 3 4 5 6 7 2 9"
    Option "EmulateWheel" "true"
    Option "EmulateWheelButton" "8"
    Option "XAxisMapping" "6 7"
    Option "YAxisMapping" "4 5"
    Option "Emulate3Buttons" "false"
With those settings the little button left acts as the middle mouse button. And also as the one when pressed that the ball will act as scrollwheel. It even scrolls in 2D ^__^ .
That way it is much better then on Windows.

Still sometimes my systems acts a bit strange and puts my mice in power-saving mode. For that I made another script to always-on those:

devIDs=$(grep -i logitech /sys/bus/usb/devices/*/manufacturer | grep -Po '[0-9]-[0-9]')
for devID in $devIDs
        echo "sudo sh -c \"echo on > /sys/bus/usb/devices/$devID/power/level\""
        sudo sh -c "echo on > /sys/bus/usb/devices/$devID/power/level"
It shouldn't be that hard to put those options & settings settable in something like KDEs systemsettings ;-)

And finally I found some new trackball-mouse on the internet!
The M-XT1URBK (en) which currently is only available from japan. The reviews seem to be positive. Hopefully it will lose its teething problems and find its way around the globe.