https://wiki.archlinux.org/api.php?action=feedcontributions&user=Drevicko&feedformat=atomArchWiki - User contributions [en]2024-03-29T15:24:08ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Logitech_Marble_Mouse&diff=201979Logitech Marble Mouse2012-05-18T01:48:47Z<p>Drevicko: /* Configuration */ added note about Gnome 3 overriding 'Emulate3Buttons'</p>
<hr />
<div>{{i18n|Logitech Marble Mouse}}<br />
[[Category:Mice]]<br />
<br />
The '''Logitech Marble Mouse''' is a pointing device with four buttons and a trackball. It is also known as the '''Trackman Marble'''. The Marble Mouse is symmetrical, making it well-suited for use with either hand. [http://simans.net/marble/ Picture]. Out-of-the box it doesn't scroll, but you can configure it to enable this.<br />
<br />
== Installation ==<br />
<br />
No driver installation is required. Your system detects the Logitech Marble Mouse at system boot, or whenever it is "hot-plugged" into a booted system.<br />
<br />
The Marble Mouse is treated like any regular mouse — you do not need to configure it. You'll probably want to, however, in order to enable scrolling or customize button actions.<br />
<br />
== Basic function ==<br />
<br />
Hardware IDs for the Marble Mouse buttons remain constant, regardless of device configuration.<br />
<br />
When no additional configuration is specified, buttons are mapped to these functions:<br />
<br />
{| border="0"<br />
! ID !! Hardware Action !! Result <br />
|-<br />
| 1 || Large button left || normal click<br />
|-<br />
| 2 || Both large buttons || middle-click †<br />
|-<br />
| 3 || Large button right || right-click<br />
|-<br />
| 4 || ''(not a button)'' || -<br />
|-<br />
| 5 || ''(not a button)'' || -<br />
|-<br />
| 6 || ''(not a button)'' || -<br />
|-<br />
| 7 || ''(not a button)'' || -<br />
|-<br />
| 8 || Small button left || browser back<br />
|-<br />
| 9 || Small button right || browser forward<br />
|}<br />
<br />
'''Notes:'''<br />
<br />
∙ Both large buttons pressed simultaneously creates a '''middle-click'''.<br> <br />
∙ † The simultaneous click is enabled by a configuration directive. It requires {{Ic|Emulate3buttons}}.<br><br />
∙ Terms ''middle-click'' and ''wheel-click'' are used interchangeably in this document.<br><br />
∙ ''Alternate-click'' may be used instead of ''right-click''. Typically, this pops up a context menu.<br><br />
∙ The result shown above occurs when no modifier key is pressed.<br><br />
∙ A different result may occur when a modifier key such as ''Ctrl'' is held while a button is clicked.<br><br><br />
<br />
{| border="0"<br />
|- Non-button Input Actions<br />
! ID !! Hardware Action !! Result <br />
|-<br />
|-<br />
| 4 || ''Roll ball down'' || move cursor down<br />
|-<br />
| 5 || ''Roll ball up'' || move cursor up<br />
|-<br />
| 6 || ''Roll ball left'' || move cursor left<br />
|-<br />
| 7 || ''Roll ball right'' || move cursor right<br />
|}<br />
<br />
'''Notes:'''<br />
<br />
∙ Cursor motion occurs when no modifier is used.<br><br />
∙ A modifier used in conjunction with rolling motion may create an alternate result.<br><br />
∙ "Modifier" refers to a key (such as ''Ctrl'') or button (as in ''mouse button'') being held while the trackball is rolled.<br><br />
<br />
:{{Box YELLOW||The Marble Mouse trackball can perform document scrolling, much like a wheel mouse. Scrolling occurs when the '''[[#Scroll modifier|scroll mod&shy;ifier]]''' is held down while the trackball is rolled. You must provide at least a '''[[#Minimal configuration|minimal configuration]]''' to enable this feature.}}<br />
<br />
Using the trackball in "wheel mode" can require some unusual gestures on the user's part. Using a wheel mouse, for example, you can resize the display font in your web browser using the ''Ctrl + wheel_roll'' gesture. With the trackball, this operation becomes ''Ctrl + hold_button + ball_roll''.<br />
<br />
== Configuration ==<br />
<br />
You may find it helpful to simply jump to the [[#Sample configuration | sample configuration]] and try it.<br />
<br />
The configuration sections contain information which may not be of interest to you. Most Arch users will be using a modern version of the X server which requires udev hot plugging.<br />
<br />
:{{Box YELLOW||'''Note:''' There is currently (as at May 2012) an issue with [http://who-t.blogspot.com.au/2011/04/gnome-30-middle-mouse-button-emulation.html Gnome 3 and middle click emulation]. See [[#"Both-large-buttons" combination-click]] below.<br />
Gnome 3 is used, for example, in Ubuntu 12.04. }}<br />
<br />
=== Buttons and trackball ===<br />
<br />
After you locate the [[#Configuration file |sample configuration file]] you may wish to alter it. You need only concern yourself with three or four setup lines.<br />
<br />
==== Assigning buttons ====<br />
<br />
You may want to assign new actions for button presses. This is done by setting positional parameters.<br />
<br />
Values may be changed for buttons '''1, 2, 3, 8,''' and '''9'''. (Button '''2''' is simply a combination press of the two large buttons.) Do not alter parameters 4, 5, 6, or 7.<br />
<br />
# This line makes the default button assignments.<br />
<br />
Option "ButtonMapping" "1 2 3 4 5 6 7 8 9"<br />
<br />
One obvious reason to assign different button actions is to accommodate left-handed placement:<br />
<br />
# This line switches the left and right large buttons, and nothing else. For left-handed user.<br />
<br />
Option "ButtonMapping" "3 2 1 4 5 6 7 8 9"<br />
<br />
Another reason to reassign is when you do not like the "normal" assignments — especially the small buttons.<br />
<br />
The line below changes the button '''2''' action to '''''browser forward'''''. Parameter two (both-large-button click) is given value '''9''' for ''browser forward''. The line below also reassigns both small buttons. We want them to emit '''''middle-click'''''. (Either button may be clicked separately.) Parameters eight and nine are given values of '''2''' for ''middle-click''.<br />
<br />
# Three buttons are given new assignments. For right-handed user.<br />
<br />
Option "ButtonMapping" "1 9 3 4 5 6 7 2 2"<br />
<br />
Parameters are positioned in numeric order. Parameters you might modify are 1, 2, 3, 8, and 9. Parameters 4, 5, 6, and 7 should be left alone; they correspond to trackball movements.<br><br><br />
<br />
==== "Both-large-buttons" combination-click ====<br />
<br />
As stated, button '''2''' is a simultaneous press of the two large buttons.<br />
<br />
Experimentation shows, in the absence of a configuration directive, this action produces an indeterminate result. It appears to issue ''some'' command, but the result is inconsistent with my expectation of ''middle-click.'' The result seems dependent on whichever object is foremost. It is inconsistent regardless. You need to enable the combination-click:<br />
<br />
:{{Box GREEN|| {{Ic| # Emulate3Buttons refers to the act of pressing buttons A and D<br> # simultaneously to emulate a middle-click or wheel click.<br><br> Option "Emulate3Buttons" "true"}}}}<br />
<br />
This is sufficient to enable the default mapping of button '''2''', which is ''wheel-click''. See [[#Minimal configuration|minimal configuration]]. <br />
<br />
As at May 2012, there is an issue with [http://who-t.blogspot.com.au/2011/04/gnome-30-middle-mouse-button-emulation.html Gnome 3 and middle click emulation]. Gnome 3 is used, for example, in Ubuntu 12.04. Gnome 3 also sets the middle click property, and defaults to "false". Since Gnome does it's settings '''after''' Xorg, the Gnome setting overrides the xorg setting, and emulation is disabled. The Gnome setting can be changed with this command:<br />
<br />
gsettings set org.gnome.settings-daemon.peripherals.mouse middle-button-enabled true<br />
<br />
You only need to do this once (per user) as Gnome remembers the settings between sessions. There is a [https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/874237/comments/13 launchpad bug] on the issue in case you're interested.<br />
<br />
==== Scroll modifier ====<br />
<br />
One huge limitation for the Marble Mouse is the lack of a scroll wheel or scroll ring. This limitation is overcome by assigning a ''scroll modifier'': a mouse button which allows the trackball to scroll. When the scroll modifier is held, the trackball scrolls. Although a scroll modifier is ''assigned'' by default (see [[#Basic function | basic function]]), the scroll modifier is '''not enabled''' by default. In addition to enabling the scroll modifier, you may ''also'' assign it to a different button.<br />
<br />
:{{Box YELLOW||'''Note:''' the scroll button has a "click" function in addition to its scroll function. The scroll modifier is a "press and hold" function separate from the "click" function. The best choice for scroll modifier is one of the small buttons. Unfortunately, standard "click" actions for those buttons are awkward. I recommend you reassign click actions for the small buttons.}}<br />
<br />
The standard scroll setting defines the small button for scrolling — that's good, — but the same button has a default ''"click"'' action that is '''''browser back'''''. A better choice is '''''middle-click'''''. ''Middle-click'' corresponds to what you'd expect from years of wheel mouse usage.<br />
<br />
Putting complaints aside (these are addressed by reassigning small buttons), you specify a button to be the '''''scroll modifier''''':<br />
<br />
Option "EmulateWheel" "true"<br />
Option "EmulateWheelButton" "8"<br />
<br />
# Button 8 is the small button on the left side, which works well for right-handed users.<br />
# Button 9 is the small button on the right side, which works well for left-handed users.<br />
# Button 2 cannot be assigned as the scroll modifier; AKA "EmulateWheelButton".<br />
<br />
'''Disable horizontal scrolling'''<br />
<br />
A particular configuration line enables horizontal scrolling. You disable horizontal scrolling by commenting that line out.<br />
<br />
# A hash mark disables a configuration line.<br />
<br />
# Option "XAxisMapping" "6 7"<br />
<br />
I use both scrolling directions, but some may find this restriction helpful. You cannot disable vertical scrolling in a similar fashion — not that you'd want to, anyway.<br />
<br />
=== Right-side or left-side ===<br />
<br />
Previous sections explain how to modify your configuration file for either left or right placement.<br />
<br />
: • On occasion, you may wish to switch between left-handed and right-handed usage.<br />
: • I do this when I feel the early signs of repetitive strain injury.<br />
<br />
To switch to the opposite placement, I manually edit my configuration file and [[#Restarting X|restart the X server.]] Comments in the file remind me which lines to change. You could devise a script to make switching more automatic, if you wanted to.<br />
<br />
: • With Arch Linux, I prefer a lightweight or non-existent desktop environment running the '''[[Openbox]]''' window manager.<br />
<br />
Other desktop environments may have widgets to simplify — or complicate, depending how you view it — switching between right and left. With Ubuntu 10.10, for example, you need only mark a box in the mouse control panel to effect a button switch. ''(You must change the configuration file to get the correct scroll modifier assignment, however. Also, Ubuntu ignores large button assignments in the configuration file; the control panel makes them unnecessary.)''<br />
<br />
=== System-wide or per-user ===<br />
<br />
{{Note| Section undergoing revision. Please jump to the sample configuration }}<br />
<br />
If you want the configuration to be system wide, you can add this line to the InputDevice-Section.<br />
<br />
Option "ButtonMapping" "1 8 3 2 9"<br />
<br />
For a per-user-configuration you need to put this in your ~/.Xmodmap<br />
<br />
pointer = 1 8 3 4 5 6 7 2 9 10 11 12 13<br />
<br />
or this in your ~/.xinitrc.<br />
<br />
xmodmap -e "pointer = 1 8 3 4 5 6 7 2 9 10 11 12 13"<br />
<br />
=== Xorg input hotplugging === <br />
<br />
{{Note| Section undergoing revision. Please jump to the sample configuration }}<br />
<br />
Two expositions help you configure a trackball with buttons for click, middle-click, right-click, and scrolling. The first exposition uses [[Xorg Input Hotplugging]]; the second does not. Edit them to suit your preferences.<br />
<br />
<!-- {{Note| Since version 1.8 Xorg-server uses udev for device detection, HAL-rules no longer work. }} --><br />
<br />
Add this entry to your {{Ic|/etc/X11/xorg.conf}}:<br />
<br />
Section "InputClass"<br />
Identifier "Logitech Trackball"<br />
MatchProduct "Trackball"<br />
Option "ButtonMapping" "1 8 3 4 5 6 7 2 9"<br />
Option "EmulateWheel" "True"<br />
Option "EmulateWheelButton" "9"<br />
Option "XAxisMapping" "6 7"<br />
EndSection<br />
<br />
To learn more about the used parameters you should read the apropriate section in the evdev man page.<br />
<br />
=== Without Xorg hotplugging ===<br />
<br />
{{Note| Section undergoing revision. Please jump to the sample configuration }}<br />
<br />
The mouse device entry in {{Ic|/etc/X11/xorg.conf}} should look like this:<br />
<br />
Section "InputDevice"<br />
Identifier "Mouse0"<br />
Driver "mouse"<br />
Option "CorePointer"<br />
Option "Device" "/dev/input/mice"<br />
Option "Protocol" "ExplorerPS/2"<br />
Option "Buttons" "9"<br />
Option "ZAxisMapping" "4 5"<br />
Option "XAxisMapping" "6 7"<br />
Option "EmulateWheelButton" "9"<br />
Option "EmulateWheel" "true"<br />
EndSection<br />
<br />
The {{Ic|"Auto"}} option for {{Ic|"Protocol"}} works fine, too.<br />
Of course you can use the name you prefer as the {{Ic|Identifier}}, as long as it's the same you use as {{Ic|InputDevice}} in the {{Ic|Section "ServerLayout"}} .<br />
<br />
== Sample configuration ==<br />
<br />
The sample configuration modifies and extends the [[#Basic function|basic function]] of the Marble Mouse.<br />
<br />
In this example, either of the two small buttons may be clicked to send a '''''wheel-click'''''. Wheel-click means the same as "middle-click" here. In addition, one of the small buttons provides '''''scrolling''''' in conjunction with the trackball. Note that only ''one'' small button has the ability for scrolling, although both small buttons are able to ''wheel-click.''<br />
<br />
Finally, clicking both large buttons simultaneously sends the '''''browser back''''' event. There is no button to send ''browser forward''.<br />
<br />
{| border="0"<br />
! ID !! Hardware Action !! Result (this configuration) !! New assignment<br />
|-<br />
| 1 || Large button left || normal click || 1<br />
|-<br />
| 2 || Both large buttons || browser back || 8<br />
|-<br />
| 3 || Large button right || right-click || 3<br />
|-<br />
| 8 || Small button left † || wheel-click || 2<br />
|-<br />
| 9 || Small button right ‡ || wheel-click || 2<br />
|}<br />
<br />
'''Notes:'''<br />
<br />
∙ Both large buttons pressed simultaneously results in ''browser back''.<br><br />
∙ Either small button, when clicked, results in ''middle-click''.<br><br />
∙ † This small button allows trackball scrolling when held down. It is the scroll modifier.<br><br />
∙ ‡ This button can be mapped for scrolling function instead. This button works<br><br />
better for left-side placement because it lies near the thumb of one's left-hand.<br><br />
Only one button can be assigned as the scroll modifier as far as I know.<br />
<br />
=== Configuration file ===<br />
<br />
The following lines are appended to '''{{ic|/etc/X11/xorg.conf.d/10-evdev.conf}}'''.<br />
<br />
This example is set up for right-hand placement. Horizontal scrolling is disabled as well.<br />
<br />
# - - - Logitech Marble Mouse Settings - - -<br />
#<br />
# For the sake of comments below, a Logitech Marble Mouse has buttons<br />
# labeled from left to right: A (large), B, C, D (large). <br />
<br />
# Preferred options for right-handed usage are:<br />
# Left to right: A=1,normal click B=2,middle-click C=2,middle-click D=3,right-click<br />
# Press button B (hold button while rolling trackball) to emulate wheel-scrolling. <br />
<br />
# Preferred options for left-handed usage (saying 'alternate-click' instead of 'right click'):<br />
# Left to right: A=3,alternate-click B=2,middle-click C=2,middle-click D=1,normal click<br />
# Press button C (hold button while rolling trackball) to emulate wheel-scrolling.<br />
<br />
# The trackball can scroll in two-axes, unlike a typical wheel mouse. Adjust the<br />
# settings to constrain the scroll action to vertical-axis-only if you prefer.<br />
<br />
# Pressing both large buttons simultaneously (b) produces a "back" action (=8). Finally,<br />
# pressing and holding button B while rolling the trackball emulates wheel-rolling action.<br />
<br />
Section "InputClass"<br />
Identifier "Marble Mouse"<br />
MatchProduct "Logitech USB Trackball"<br />
MatchIsPointer "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Driver "evdev"<br />
# Physical button #s: A b D - - - - B C b = A & D simultaneously; - = no button<br />
Option "ButtonMapping" "1 8 3 4 5 6 7 2 2"<br />
# Option "ButtonMapping" "1 8 3 4 5 6 7 2 2" # For right-hand placement<br />
# Option "ButtonMapping" "3 8 1 4 5 6 7 2 2" # For left-hand placement<br />
#<br />
# EmulateWheel refers to emulating a mouse wheel using Marble Mouse trackball.<br />
Option "EmulateWheel" "true"<br />
# Option "EmulateWheelButton" "8" # Factory default; use "9" for left-side placement.<br />
Option "EmulateWheelButton" "8"<br />
# Option "ZAxisMapping" "4 5"<br />
Option "ZAxisMapping" "4 5"<br />
# Option "XAxisMapping" "6 7" # Disable this for vertical-only scrolling.<br />
# Option "XAxisMapping" "6 7"<br />
# Emulate3Buttons refers to the act of pressing buttons A and D<br />
# simultaneously to emulate a middle-click or wheel click.<br />
Option "Emulate3Buttons" "true"<br />
# Option "Emulate3Buttons" "true" # Factory default.<br />
EndSection<br />
<br />
=== Restarting X ===<br />
<br />
Changes made to '''{{ic|/etc/X11/xorg.conf.d/10-evdev.conf}}''' do not take effect until the '''X''' session is restarted. To restart the X session, logout from your window manager and log back in.<br />
<br />
Users of other Linux distributions may find the configuration file in another location. Ubuntu 10.10 uses '''{{ic|/usr/share/X11/xorg.conf.d/10-evdev.conf}}'''.<br />
<br />
== Minimal configuration ==<br />
<br />
At times it can be useful to start with the absolute minimum and build from there. This is one facet of [[The_Arch_Way|The Arch Way]]. In this spirit, I decided to see how few lines I might use to create a usable Marble Mouse configuration.<br />
<br />
You can omit ''all'' configuration lines and the Marble Mouse is still usable for basic pointing and clicking. However, it won't be able to scroll. The "both-large-button" simultaneous click produces indeterminate results — experimentation shows this.<br />
<br />
Given that you're satisfied with [[#Basic function|default button settings]] and you wish only to enable scrolling and the "both-large-button" click, you need these lines. The following lines are appended to '''{{ic|/etc/X11/xorg.conf.d/10-evdev.conf}}'''.<br />
<br />
Section "InputClass"<br />
Identifier "Marble Mouse"<br />
MatchProduct "Logitech USB Trackball"<br />
Option "EmulateWheel" "true"<br />
Option "EmulateWheelButton" "8"<br />
Option "XAxisMapping" "6 7"<br />
Option "Emulate3Buttons" "true"<br />
EndSection<br />
<br />
== Additional tweaks ==<br />
<br />
=== Console (gpm) ===<br />
<br />
See [[Console_Mouse_Support | Console Mouse Support]] for details. Within the console you can use {{Ic|gpm}} with type option set to '''imps2'''. Edit '''{{ic|/etc/conf.d/gpm}}''' such that:<br />
<br />
GPM_ARGS="-m /dev/input/mice -t imps2"<br />
<br />
This lets you use the large left button for selecting text and the right button to extend the selection. The small left button acts as a middle-click; it pastes the selection.<br />
<br />
=== Chromium browser ===<br />
<br />
By default, Chromium treats a middle-click as a ''paste'' command. This choice stems from "Linux tradition", not the capricious whim of one developer. Like myself, you may prefer a '''''Windows''''' approach. I want the middle button(s) to initiate ''automatic scrolling,'' not ''pasting'':<br><br><br />
<br />
* A browser extension '''AutoScroll''' allows middle-click to initiate automatic scrolling.<br />
* This extension is helpful for any Linux user with a wheel mouse, not just Marble Mouse users.<br />
* A middle-click initiates automatic scrolling when clicked on a blank area of a web page.<br><br><br />
<br />
* When you program both small buttons to emit middle-click, either button can initiate automatic scrolling. That is a click function.<br />
* When you program one of the small buttons to act as scroll modifier (mouse setup), you can manually scroll web pages '''without''' fixing the browser. That is a press‑and‑hold function. (I recommend installing AutoScroll even though it is not absolutely necessary for scrolling.)<br />
* After you assign the scroll modifier to one of the small buttons, the small buttons act a bit differently from one another. The difference is seen when you compare their "press‑and‑hold" behaviors.<br><br><br />
<br />
Be sure to install '''''AutoScroll'''''; the similarly-named ''Auto Scroll'' extension implements a different feature.<br />
<br />
This information also applies to the browser called '''Google Chrome'''.<br />
<br />
=== Firefox browser ===<br />
<br />
Older versions of Firefox map horizontal-scrolling hardware to perform '''''browser back''''' and '''''browser forward''''' navigation.<br />
<br />
This makes vertical scrolling using the trackball almost impossible.<br><br />
The slightest horizontal motion triggers a URL redirection. To fix this:<br><br />
<br />
* Enter {{Ic|about:config}} in the location bar<br />
* Find the internal variable named {{Ic|mousewheel.horizscroll.withnokey.action}}. Set its value to '''0'''.<br />
* It may be useful to set {{Ic|mousewheel.horizscroll.withnokey.numlines}} to '''1''' as well.<br />
<br />
== Further reading ==<br />
<br />
{| border="0"<br />
| Arch wiki documentation: || [[All Mouse Buttons Working | All mouse buttons working]]<br />
|-<br />
| Arch wiki documentation: || [[Xorg#Configuring | Description of 10-evdev.conf]]<br />
|-<br />
| Marble mouse scroll wheel: || [http://simans.net/marble/ Replacement for SetPoint driver]<br />
|-<br />
| Joe Shaw blog post: || [http://joeshaw.org/2010/10/01/681/ Linux input ecosystem]<br />
|-<br />
| Ubuntu community: || [https://help.ubuntu.com/community/Logitech_Marblemouse_USB Logitech Marble Mouse]<br />
|-<br />
| Chrome web store: || [https://chrome.google.com/webstore/detail/occjjkgifpmdgodlplnacmkejpdionan AutoScroll extension]<br />
|}</div>Drevicko