“UbuntuHelp:Logitech Marblemouse USB”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
第6行: | 第6行: | ||
Placing this file in /etc/hal/fdi/policy/ will enable scrolling while holding down the small, left mouse button on a Logitech Marble Mouse USB. | Placing this file in /etc/hal/fdi/policy/ will enable scrolling while holding down the small, left mouse button on a Logitech Marble Mouse USB. | ||
<pre><nowiki> | <pre><nowiki> | ||
− | <match key="info.product" string="Logitech USB Trackball"> | + | <?xml version="1.0" encoding="ISO-8859-1"?> |
− | + | <deviceinfo version="0.2"> | |
− | + | <device> | |
− | + | <match key="info.product" string="Logitech USB Trackball"> | |
− | + | <merge key="input.x11_options.ButtonMapping" type="string">1 8 3 2 9</merge> | |
− | + | <merge key="input.x11_options.EmulateWheel" type="string">true</merge> | |
− | </match> | + | <merge key="input.x11_options.EmulateWheelButton" type="string">8</merge> |
+ | <merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge> | ||
+ | <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge> | ||
+ | </match> | ||
+ | </device> | ||
+ | </deviceinfo> | ||
</nowiki></pre> | </nowiki></pre> | ||
== Middle Click == | == Middle Click == | ||
第22行: | 第27行: | ||
<pre><nowiki> | <pre><nowiki> | ||
$ xmodmap .Xmodmap | $ xmodmap .Xmodmap | ||
+ | </nowiki></pre> | ||
+ | Using xmodmap affects all mice you have plugged in, an alternative is to use xinput to remap the buttons just for the device you specify. | ||
+ | <pre><nowiki> | ||
+ | $ xinput set-button-map "Logitech USB Trackball" 1 8 3 4 5 6 7 2 9 | ||
+ | </nowiki></pre> | ||
+ | If you have a different device and don't know its identifier, you can find it via: | ||
+ | <pre><nowiki> | ||
+ | $ xinput list | ||
</nowiki></pre> | </nowiki></pre> | ||
== External Links == | == External Links == | ||
第28行: | 第41行: | ||
* [http://ubuntuforums.org/showthread.php?t=938487] - Link to original thread in intrepid testing forums for the Logitech Marble Mouse USB. | * [http://ubuntuforums.org/showthread.php?t=938487] - Link to original thread in intrepid testing forums for the Logitech Marble Mouse USB. | ||
---- | ---- | ||
− | [[category:CategoryHardware]] | + | [[category:CategoryHardware]] [[category:CategoryX]] |
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2008年12月16日 (二) 19:16的版本
点击翻译: |
English |
Introduction
The newest version of Xorg used in Intrepid brings changes as to how input devices are detected and set up for use. Hal now plays a large part in the process, and as such xorg.conf is largely ignored, so any settings you had in xorg.conf will no longer be in use when X starts. You will now need to add files to /etc/hal/fdi/policy with an .fdi extension.
Example mouse-wheel.fdi
Placing this file in /etc/hal/fdi/policy/ will enable scrolling while holding down the small, left mouse button on a Logitech Marble Mouse USB.
<?xml version="1.0" encoding="ISO-8859-1"?> <deviceinfo version="0.2"> <device> <match key="info.product" string="Logitech USB Trackball"> <merge key="input.x11_options.ButtonMapping" type="string">1 8 3 2 9</merge> <merge key="input.x11_options.EmulateWheel" type="string">true</merge> <merge key="input.x11_options.EmulateWheelButton" type="string">8</merge> <merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge> <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge> </match> </device> </deviceinfo>
Middle Click
Currently the button mapping described above is being ignored by HAL. This is particularly problematic if you want one of the small buttons to serve as middle click. A simple workaround is to remap what you need via xmodmap. As an example, let's map the small left button as middle click. Save this in your .Xmodmap file:
pointer = 1 8 3 4 5 6 7 2 9
Note that all we did was to swap the numbers 2 and 8. If you'd like to use the small right button as middle click, swap 2 and 9 instead. The .Xmodmap file will be loaded next time you log in. To run it manually, run:
$ xmodmap .Xmodmap
Using xmodmap affects all mice you have plugged in, an alternative is to use xinput to remap the buttons just for the device you specify.
$ xinput set-button-map "Logitech USB Trackball" 1 8 3 4 5 6 7 2 9
If you have a different device and don't know its identifier, you can find it via:
$ xinput list
External Links
- [1] - Explanation of how to find your input device using xinput.
- [2] - Link to launchpad with further explanation of how the new hal policy works.
- [3] - Link to original thread in intrepid testing forums for the Logitech Marble Mouse USB.