个人工具
104.160.18.24
该IP地址的讨论
登录
查看“UbuntuHelp:MX510Mouse”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:MX510Mouse”的源代码
来自Ubuntu中文
←
UbuntuHelp:MX510Mouse
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/MX510Mouse}} {{Languages|UbuntuHelp:MX510Mouse}} === 0. Creating backup === First of all, run <code><nowiki>sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf~backup</nowiki></code> If your system hangs, you can run <code><nowiki>sudo cp /etc/X11/xorg.conf~backup /etc/X11/xorg.conf</nowiki></code> to get x back. === 1. Changing xorg.conf === <code><nowiki>cat /proc/bus/input/devices</nowiki></code> and find the one with: <code><nowiki>N: Name="Logitech USB-PS/2 Optical Mouse"</nowiki></code> look at "Handlers", f.ex. <code><nowiki>H: Handlers=mouse1 event4</nowiki></code> note the number after event, (i.e. event4) in xorg.conf: <code><nowiki>gksudo gedit /etc/X11/xorg.conf</nowiki></code> change <pre><nowiki>Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" Option "Device" "/dev/input/mice" Option "Protocol" "ImPS/2" Option "ZAxisMapping" "4 5" Option "Emulate3Buttons" "true" EndSection</nowiki></pre> to <pre><nowiki>Section "InputDevice" Identifier "Configured Mouse" Driver "evdev" Option "CorePointer" Option "Device" "/dev/input/event4" Option "Protocol" "ImPS/2" Option "Buttons" "10" Option "ZAxisMapping" "4 5" Option "Emulate3Buttons" "true" EndSection</nowiki></pre> (Changed Driver to "evdev", changed "Device" to "/dev/input/[THE EVENT FROM EARLIER]" added Option "Buttons" "10") Restart x by pressing [Ctrl]+[Alt]+[Backspace] at the same time, and everything should work. If you can't get back in to gnome, you could revert from backup as stated above and run <code><nowiki>sudo /etc/init.d/gdm restart</nowiki></code> If everything works continue to the next step. === 2. Mapping the keys === Install xvkbd and xbindkeys <code><nowiki>sudo apt-get install xvkbd xbindkeys</nowiki></code> and make the ~/.xbindkeysrc file: <code><nowiki>gedit ~/.xbindkeysrc</nowiki></code> write <pre><nowiki>"/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]"" m:0x0 + b:6 "/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_R]\[Right]"" m:0x0 + b:7 "/usr/bin/gnome-terminal" b:8</nowiki></pre> and save. (enables back and forward. the last two lines makes the "logitech button" or whatever start a new terminal) Then run <code><nowiki>xbindkeys</nowiki></code> and everything should work. Then make xbindkeys start automatically: System -> Preferences -> Sessions -> Add -> xbindkeys === (3. Eventual problems) === Some users have had problems with wrong mapping of the scroll-buttons. This can be solved with adding the following line to the "InputDevice" section in xorg.conf: <code><nowiki>Option "ButtonMapping" "1 2 3 4 5 9 10 8 6 7"</nowiki></code> Ending up with: <pre><nowiki>Section "InputDevice" Identifier "Configured Mouse" Driver "evdev" Option "CorePointer" Option "Device" "/dev/input/event4" Option "Protocol" "ImPS/2" Option "Buttons" "10" Option "ZAxisMapping" "4 5" Option "Emulate3Buttons" "true" Option "ButtonMapping" "1 2 3 4 5 9 10 8 6 7" EndSection</nowiki></pre> To test witch buttons are mapped to what you can run the following command in a terminal: <code><nowiki>xev | grep button</nowiki></code> [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:MX510Mouse
。