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.
Contents |
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" .
Left-hand Usage Setup
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).
Right-hand Usage Setup
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 .
If you use the device with your right hand but prefer a more traditional setup with left big button as left click and right big button as right click, use
pointer = 1 9 3 4 5 6 7 8 2 10 11 12 13
in ~/.Xmodmap or use xmodmap in ~/.xinitrc as described above.
Configuration using Xorg input hotplugging
Marble mouse trackball can be configured to work with xorg input hotplugging. The configuration described below makes the ball act like a scroll wheel when the small right button is pressed -- if you're left-handed you'll probably want to change the "EmulateWheelButton" to "9". This solution requires xf86-input-evdev driver version 2.1.0 (or later), as well as the following fdi file:
<deviceinfo version="0.2"> <device> <match key="info.product" string="Logitech USB Trackball"> <merge key="input.x11_options.EmulateWheel" type="string">true</merge> <merge key="input.x11_options.EmulateWheelTimeout" type="string">200</merge> <merge key="input.x11_options.EmulateWheelButton" type="string">8</merge> <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge> <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge> <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge> </match> </device> </deviceinfo>
The file should be saved to /etc/hal/fdi/policy directory -- the filename itself is not important, so you can save it as 10-marblemouse.fdi, for example. If your Marble mouse is connected to the computer using PS/2 connector rather than USB you'll need to replace "Logitech USB Trackball" with "ImExPS/2 Logitech Explorer Mouse" in the "info.product" line above.
You'll need to restart hal and xorg-server for the changes to take effect.
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).
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.