Logitech Marble Mouse
From ArchWiki
Well, it is a trackball, actually ;-), it has 4 buttons (2 big and 2 small), and a comfortable ball in the middle. Let's see how to to use them all in a handy way.
[edit] Xorg configuration: three buttons + vertical and horizontal scroll
Fully configuring the Marble® Mouse for Xorg is easy but somewhat tricky.
The mouse device entry in /etc/X11/xorg.conf should look like this:
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "Buttons" "9"
Option "ZAxisMapping" "4 5"
Option "XAxisMapping" "6 7"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "9"
EndSection
The "Auto" option for "Protocol" works fine, too. Of course you can use the name you prefer as the Identifier, as long as it's the same you use as InputDevice in the Section "ServerLayout" .
Now the mouse is configured with the necessary number of buttons. The next step is adding the following line in your ~/.Xmodmap file:
pointer = 1 8 3 4 5 6 7 2 9 10 11 12 13
or, alternatively, this one in ~/.xinitrc (before the exec line, of course):
xmodmap -e "pointer = 1 8 3 4 5 6 7 2 9 10 11 12 13"
This configuration makes the following assignments:
- left click: left big button
- middle click: left little button
- right click: right big button
- scrolling (both vertical and horizontal): right little button + ball movement
This button layout is the most obvious, but is actually more comfortable when using the trackball with the left hand, (because I find easier to double-click with the ring finger than with the thumb, and moving the ball while pressing the right little button with the left thumb).
If you are right-handed you may prefer these assignments:
- left click: right big button
- middle click: right little button
- right click: left big button
- scrolling: left little button + ball movement
This is achieved with
Option "EmulateWheelButton" "8"
instead of "9" in /etc/X11/xorg , and
pointer = 3 9 1 4 5 6 7 8 2 10 11 12 13
in ~/.Xmodmap or
xmodmap -e "pointer = 3 9 1 4 5 6 7 8 2 10 11 12 13"
in ~/.xinitrc .
[edit] Console configuration (gpm)
In the console you can use gpm (see How_to_use_a_mouse_in_the_console), but the type option should be set to imps2: edit /etc/conf.d/gpm to show
GPM_ARGS="-m /dev/input/mice -t imps2"
This lets yow use the left big button as left click (selects text), the right ones as right click (extends the selection) and the little left one as middle click (pastes the selection).
[edit] Firefox tweaking
By default firefox maps the horizontal scroll to back/forth navigation, which is really annoying because it's nearly impossible to scroll vertically with the ball without accidentally triggering those ones.
The fix is simple: put about:config in the url bar and set mousewheel.horizscroll.withnokey.action to
0.
I like to set mousewheel.horizscroll.withnokey.numlines to 1, too.