特殊:Badtitle/NS100:ManyButtonsMouseHowto:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第7行: | 第7行: | ||
== Beyond the Basics == | == Beyond the Basics == | ||
If you have installed the GNOME environment (default for Ubuntu) you ''already'' have the software needed to get the "6th" and "7th" mouse buttons working (forward/backward on most mice)! | If you have installed the GNOME environment (default for Ubuntu) you ''already'' have the software needed to get the "6th" and "7th" mouse buttons working (forward/backward on most mice)! | ||
== Limitations == | |||
Note that Linux's X Input system is not able to bind a combination of more than one mouse button to a certain action. For example, it is not possible to bind left-clicking while simultaneously scrolling up to a specific action. Only binding of one action to each button is allowed, except when combining them with keyboard modifier keys (Ctrl, Alt, Super,...) | |||
== Remapping buttons == | == Remapping buttons == | ||
Some pointing devices have a strange button mapping, so need some tweaking to match X's perception of things. Such tweaking can be performed at runtime with xinput - find your device in <code><nowiki>xinput list</nowiki></code> and run <code><nowiki>xinput set-button-map <device name> 1 2 3 6 7</nowiki></code>, replacing those numbers with your required button mapping. You might be able to find it by searching for other people with the same hardware, or you might need to play around and see what works. | Some pointing devices have a strange button mapping, so need some tweaking to match X's perception of things. Such tweaking can be performed at runtime with xinput - find your device in <code><nowiki>xinput list</nowiki></code> and run <code><nowiki>xinput set-button-map <device name> 1 2 3 6 7</nowiki></code>, replacing those numbers with your required button mapping. You might be able to find it by searching for other people with the same hardware, or you might need to play around and see what works. | ||
第37行: | 第39行: | ||
== Useful links == | == Useful links == | ||
* [http://www.google.com/search?q=configure+x11+mouse+buttons&btnG=Search&hl=en&lr= Google Search "configure x11 mouse buttons"] | * [http://www.google.com/search?q=configure+x11+mouse+buttons&btnG=Search&hl=en&lr= Google Search "configure x11 mouse buttons"] | ||
* [http://www.lirc.org/html/configure.html Configuring LIRC (Linux Infrared Remote Control)] | * [http://www.lirc.org/html/configure.html Configuring LIRC (Linux Infrared Remote Control)] | ||
* [http://fedoraforum.org/forum/showthread.php?t=27470 Fedora Forum: Configuring mouse side buttons in FC3] | * [http://fedoraforum.org/forum/showthread.php?t=27470 Fedora Forum: Configuring mouse side buttons in FC3] | ||
* [http://fedoraforum.org/forum/showthread.php?s=5745dd389c241334b0dc76f0f7b86a16&t=25659 Fedora Forum: Configuring mouse buttons] | * [http://fedoraforum.org/forum/showthread.php?s=5745dd389c241334b0dc76f0f7b86a16&t=25659 Fedora Forum: Configuring mouse buttons] |
2009年11月17日 (二) 19:55的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/ManyButtonsMouseHowto }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/af | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|Afrikaans| [[::ManyButtonsMouseHowto/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/ar | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|العربية| [[::ManyButtonsMouseHowto/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/az | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|azərbaycanca| [[::ManyButtonsMouseHowto/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/bcc | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|جهلسری بلوچی| [[::ManyButtonsMouseHowto/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/bg | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|български| [[::ManyButtonsMouseHowto/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/br | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|brezhoneg| [[::ManyButtonsMouseHowto/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/ca | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|català| [[::ManyButtonsMouseHowto/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/cs | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|čeština| [[::ManyButtonsMouseHowto/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/de | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|Deutsch| [[::ManyButtonsMouseHowto/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/el | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|Ελληνικά| [[::ManyButtonsMouseHowto/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/es | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|español| [[::ManyButtonsMouseHowto/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/fa | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|فارسی| [[::ManyButtonsMouseHowto/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/fi | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|suomi| [[::ManyButtonsMouseHowto/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/fr | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|français| [[::ManyButtonsMouseHowto/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/gu | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|ગુજરાતી| [[::ManyButtonsMouseHowto/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/he | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|עברית| [[::ManyButtonsMouseHowto/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/hu | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|magyar| [[::ManyButtonsMouseHowto/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/id | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|Bahasa Indonesia| [[::ManyButtonsMouseHowto/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/it | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|italiano| [[::ManyButtonsMouseHowto/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/ja | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|日本語| [[::ManyButtonsMouseHowto/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/ko | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|한국어| [[::ManyButtonsMouseHowto/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/ksh | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|Ripoarisch| [[::ManyButtonsMouseHowto/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/mr | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|मराठी| [[::ManyButtonsMouseHowto/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/ms | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|Bahasa Melayu| [[::ManyButtonsMouseHowto/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/nl | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|Nederlands| [[::ManyButtonsMouseHowto/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/no | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|norsk| [[::ManyButtonsMouseHowto/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/oc | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|occitan| [[::ManyButtonsMouseHowto/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/pl | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|polski| [[::ManyButtonsMouseHowto/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/pt | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|português| [[::ManyButtonsMouseHowto/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/ro | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|română| [[::ManyButtonsMouseHowto/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/ru | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|русский| [[::ManyButtonsMouseHowto/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/si | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|සිංහල| [[::ManyButtonsMouseHowto/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/sq | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|shqip| [[::ManyButtonsMouseHowto/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/sr | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|српски / srpski| [[::ManyButtonsMouseHowto/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/sv | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|svenska| [[::ManyButtonsMouseHowto/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/th | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|ไทย| [[::ManyButtonsMouseHowto/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/tr | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|Türkçe| [[::ManyButtonsMouseHowto/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/vi | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|Tiếng Việt| [[::ManyButtonsMouseHowto/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/yue | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|粵語| [[::ManyButtonsMouseHowto/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/zh | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|中文| [[::ManyButtonsMouseHowto/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/zh-hans | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|中文(简体)| [[::ManyButtonsMouseHowto/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ManyButtonsMouseHowto | UbuntuHelp:ManyButtonsMouseHowto | {{#if: | :}}ManyButtonsMouseHowto}}/zh-hant | • {{#if: UbuntuHelp:ManyButtonsMouseHowto|中文(繁體)| [[::ManyButtonsMouseHowto/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:ManyButtonsMouseHowto|:ManyButtonsMouseHowto|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :ManyButtonsMouseHowto/zh | | {{#ifexist: ManyButtonsMouseHowto/zh | | {{#ifeq: {{#titleparts:ManyButtonsMouseHowto|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:ManyButtonsMouseHowto|1|-1|}} | zh | | }}
- title Configuring a Multi-Button Mouse
This page describes how to configure Ubuntu to fully utilize a mouse with multiple buttons, wheels, and other controls.
Before You Begin
It's important to note that Ubuntu considers a standard two button, scroll/click-wheel mouse to have five buttons. Each main button (left and right) count as one, the downward click on the wheel counts as another, and the up/down scrolling also count as one each (2+1+2=5).
Beyond the Basics
If you have installed the GNOME environment (default for Ubuntu) you already have the software needed to get the "6th" and "7th" mouse buttons working (forward/backward on most mice)!
Limitations
Note that Linux's X Input system is not able to bind a combination of more than one mouse button to a certain action. For example, it is not possible to bind left-clicking while simultaneously scrolling up to a specific action. Only binding of one action to each button is allowed, except when combining them with keyboard modifier keys (Ctrl, Alt, Super,...)
Remapping buttons
Some pointing devices have a strange button mapping, so need some tweaking to match X's perception of things. Such tweaking can be performed at runtime with xinput - find your device in xinput list
and run xinput set-button-map <device name> 1 2 3 6 7
, replacing those numbers with your required button mapping. You might be able to find it by searching for other people with the same hardware, or you might need to play around and see what works.
Mapping More Buttons
The key to being able to program mouse buttons beyond the seven already discussed is to install imwheel (from the Universe repository). Imwheel will enable you to define application-specific actions to your additional mouse buttons.
- Download and install imwheel using Synaptic, Adept, or apt-get
- Modify your `/etc/X11/imwheel/imwheelrc` or `~/.imwheelrc` file to tell imwheel what to do with a mouse click when it happens in a particular application. See the Wikis referenced below for details on what you can do with your imwheelrc or .imwheelrc file.
NOTE: You can use modifications to the `~/.imwheelrc` to limit imwheel behavior to specific users on your system. 1.#4 Finally, if desired, tell X11 to run imwheel whenever X11 is started (modifying `/etc/X11/Xsession.d/60imwheel_start-imwheel` and changing `IMWHEEL_START=0` to `=1` in `/etc/X11/imwheel/startup.conf`). Alternately, you can start imwheel manually.
Before You Proceed
Before any further editing to `xorg.conf` or `.imwheelrc`, it might be helpful to check your mouse button mappings. Run `imwheel -c` from a terminal window for imwheel's graphical UI. Pressing the Grab``Wheel``Action button and then one of your mouse's buttons should cause imwheel to show the button's default mapping. In practice, this seemed somewhat inconsistent, but results may differ depending on your particular mouse.
The information you glean from this test could prove helpful if your mouse doesn't have traditional button mappings. If, for example, your side mouse buttons map to the standard left and right (1 and 2) positions, and you wanted these side buttons to control Firefox's Back and Forward buttons, you would use the following `.imwheelrc` entry for Firefox.
"^Firefox-bin$" None,Left,Alt_L|Left None,Right,Alt_L|Right
Examples
Frequently, the best way to learn is to look at what works for other people. Here are some examples of working `imwheelrc` files. Compare these to your own to help you troubleshoot and test out new configurations.
imwheelrc
Here is an example of what a portion of my `.imwheelrc` looks like:
"^Firefox-bin$" # Flip between browser tabs None, Left, Control_L|Page_Up None, Right, Control_L|Page_Down
If you'd like to customize your mouse buttons for additional applications, just add more entries like this to the `imwheelrc` file.
Useful links
- Google Search "configure x11 mouse buttons"
- Configuring LIRC (Linux Infrared Remote Control)
- Fedora Forum: Configuring mouse side buttons in FC3
- Fedora Forum: Configuring mouse buttons
- HP: Customizing the Mouse and Keyboard