如何设置鼠标中键单击的自定义选项?

如何设置鼠标中键单击的自定义选项?

我有一只现在应该很不常见的鼠标,Logitech Usb Marble 鼠标。关于这款特定鼠标的问题,但它过于本地化,因为它处理的是 Ubuntu 12.04 及更早的版本,解决方案不再适用。在问题中,有一个指向Ubuntu 帮助页面专为我的型号鼠标设计,但多年未更新,且解决方案不再兼容 12.10 及更高版本。

按照 Ubuntu 早期版本的指示创建 50-marblemouse.conf 文件会导致系统崩溃。我必须通过 USB 启动并删除有问题的文件,然后才能再次运行我的发行版。

所以问题是,如何在 Ubuntu 14.04 上自定义鼠标按钮功能(即按下两个较小的鼠标按钮来模拟鼠标中键单击)?

答案1

看看这个:

https://wiki.archlinux.org/index.php/Logitech_Marble_Mouse#Configuration_file

长话短说,在10-evdev.conf和 不在 中进行必要的编辑50-marblemouse.conf对我来说就完成了工作。

答案2

在 Ubuntu 14.04 上:

  1. 编辑 /usr/share/X11/xorg.conf.d/10-evdev.conf,例如sudo vim /usr/share/X11/xorg.conf.d/10-evdev.conf
  2. 将以下块添加到末尾10-evdev.conf
  3. 注销并重新登录

复制自https://wiki.archlinux.org/index.php/Logitech_Marble_Mouse#Configuration_file

#       - - - Logitech Marble Mouse Settings - - -
#
#       The Logitech Marble Mouse buttons are mapped [A-D] from left to right: 
#       A (large); B (small) |  C (small); D (large). 
#
#       Preferred options for right-handed usage:
#       A = normal click [1]  
#       B = middle-click [2] 
#       C = middle-click [2] 
#       D = right-click [3]
#       Hold button B while rolling trackball to emulate wheel-scrolling. 
#
#       Preferred options for left-handed usage:
#       A = right-click [3]  
#       B = middle-click [2] 
#       C = middle-click [2]
#       D = normal click [1]
#       Hold button C while rolling trackball to emulate wheel-scrolling.
#       Pressing both large buttons simultaneously (b) produces a "back" action.

Section "InputClass"
        Identifier  "Marble Mouse"
        MatchProduct "Logitech USB Trackball"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"

#       Physical button #s:     A b D - - - - B C    
#       Option "ButtonMapping" "1 8 3 4 5 6 7 2 2"   right-hand placement
#       Option "ButtonMapping" "3 8 1 4 5 6 7 2 2"   left-hand placement
#       b = A & D 
        Option "ButtonMapping" "1 8 3 4 5 6 7 2 2"

#       EmulateWheel: Use Marble Mouse trackball as mouse wheel 
#       Factory Default: 8; Use 9 for right side small button
        Option "EmulateWheel" "true"
        Option "EmulateWheelButton" "8"

#       EmulateWheelInertia: How far (in pixels) the pointer must move to
#       generate button press/release events in wheel emulation mode.
#       Factory Default: 50
        Option "EmulateWheelInertia" "10"

#       Axis Mapping: Enable vertical [ZAxis] and horizontal [XAxis] scrolling
        Option "ZAxisMapping" "4 5"
#       Option "XAxisMapping" "6 7"

#       Emulate3Buttons: Required to interpret simultaneous press of two large
#       buttons, A & D, as a seperate command, b.
#       Factory Default: true
        Option "Emulate3Buttons" "true"
EndSection

答案3

在 Ubuntu 17 和 XFCE 中,鼠标中键复制粘贴根本不起作用。

解决方案:

要启用鼠标中键粘贴,请编辑 xinput。

a) 查询你的设备:xinput list

识别您的鼠标。我的鼠标编号是 10。

b) xinput 列表属性 10

给我鼠标的设置。

c) 我需要更改“libinput Middle Emulation Enabled (294):”的值,并且我需要以 root 身份执行此操作:

sudo xinput set-prop 10 “libinput 中间模拟已启用” 1

d)检查值是否变为1:

xinput 列表属性 10

是的,它可以工作:“libinput Middle Emulation Enabled (294): 1”

背后的原因是什么: https://wiki.ubuntu.com/X/Config/Input

我强烈反对 Ubuntu 和 Gnome 决定禁用标准的 Unix 鼠标中键粘贴。即使在 XFCE Ubuntu 17 中,它也受到了严重破坏。

非常感谢 Gilles (https://unix.stackexchange.com/users/885/gilles) 找到了解决方案!!!

相关内容