个人工具

UbuntuHelp:G7Mouse

来自Ubuntu中文

Oneleaf讨论 | 贡献2007年5月24日 (四) 09:52的版本 (新页面: {{From|https://help.ubuntu.com/community/G7Mouse}} {{Languages|UbuntuHelp:G7Mouse}} == Logitech G7 Mouse == The following describes how to configure the [http://www.logitech.com/index.cf...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索


Logitech G7 Mouse

The following describes how to configure the Logitech G7 Laser Cordless Mouse. Code was originally designed for Ubuntu 5.10 "The Breezy Badger".

Edit xorg.conf file

First we'll tell X how to recognize our G7.

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
gksudo gedit /etc/X11/xorg.conf

Scroll down until you find the mouse section, something like:

Section "InputDevice"
	Identifier	"Configured Mouse"

REPLACE the entire mouse section from "Section "Input Device"" to "End Section" with the following:

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"Protocol"		"evdev"
	Option       	"Dev Name"		"Logitech USB Receiver"
	Option		"Device"		"/dev/input/mice"
	Option		"Buttons"		"8"
	Option		"ZAxisMapping"		"4 5 7 8"
EndSection

Save the file.

Restart X

First bookmark this page because you will need to come back to finish. Then write down the following steps:

  • Log out as usual.
  • Simultaneously press "Control + Alt + Backspace"
  • If the mouse cursor moves like it should, log back in and proceed to the next section.

If the mouse cursor won't move, simultaneously press "CONTROL + ALT + F1" and type the following to restore your prior settings:

sudo cp /etc/X11/xorg.conf_backup /etc/X11/xorg.conf
sudo restartx

Configure key-bindings

First install xvkbd and xvindkeys:

sudo apt-get install xvkbd xbindkeys
gedit ~/.xbindkeysrc

You then have two choices of code to enter. The following code will

  • Allow the mouse "back" button to go back in Nautilus.
  • Allow the left/right tilt on the scroll wheel to scroll text left and right in programs such as Firefox when applicable.

Copy and paste the following:

"/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:6
"/usr/X11R6/bin/xvkbd -xsendevent -text "\[right]""
m:0x0 + b:7
"/usr/X11R6/bin/xvkbd -xsendevent -text "\[left]""
m:0x0 + b:8

Save the file.

OR you can use my preferred code below which will

  • Allow the mouse "back" button to go back in Nautilus.
  • Allow the left/right tilt on the scroll wheel to move through open tabs in Firefox! :)

Copy and paste the following:

"/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:6
"/usr/X11R6/bin/xvkbd -xsendevent -text "\[Control_L]\[Page_Down]""
m:0x0 + b:7
"/usr/X11R6/bin/xvkbd -xsendevent -text "\[Control_L]\[Page_Up]""
m:0x0 + b:8

Save the file.

Finally, go to "System > Preferences > Sessions", click on the "Startup Programs" tab, click "+Add" and enter "xbindkeys" as a Startup Command.

Log out, then log in again and run a final test.

Bonus: You do not need the "Logitech Applet" as you can change the sensitivity settings directly on the G7 mouse by pressing the "+" and "-" buttons on the mouse next to the scroll wheel. B)