Logitech Trackman Marble 无法单击鼠标中键

Logitech Trackman Marble 无法单击鼠标中键

我有一台 Logitech Trackman Marble(也称为 MarbleMouse),它没有中键。以前,我通过同时单击左键和右键来模拟中键单击。这在 KDE Plasma 下效果很好。

然而,我厌倦了 Plasma,最近又换回了 OpenBox。现在,我的模拟中键不再起作用了。

/etc/X11/xorg.conf我已在和 中将Emulate3Buttons 设置为 true /usr/share/X11/xorg.conf.d/50-marblemouse.conf。我知道后一个文件仍在读取中,因为我需要对其进行修改才能滚动,而且它仍然有效。

xorg 7.7我在 Ubuntu 12.10 下运行OpenBox 3.5.0

答案1

老问题,在 Ubuntu 18.10 中仍然存在。

如果您想解决鼠标中键问题,libinput 和 evdev 是 duckduckgo 中要查找的主要关键字。以下是一些解决方案的建议。

你这个问题提得非常具体...我猜这是关于终端中的 Unix 风格的复制粘贴,对吗?!?

请看这里:

https://askubuntu.com/a/390308/354678

并且非常恰当:

https://unix.stackexchange.com/questions/9973/configuring-mouse-for-rightleft-button-simulating-middle-click-for-copy-paste

https://wiki.ubuntu.com/X/Quirks#A2-button_Mice

如何在 12.04 LTS 中启用鼠标中键模拟?

这在很大程度上取决于窗口管理器。XFCE 中的操作方式与 Gnome 或 Unity 中的不同(因为操作方式不同)。

或者 Wayland?!?

配置方法的混乱使得生活难以预测。对于现代系统,调用 man evdev 可能会有所帮助。

我可以发布示例配置(我的 Logitech Marble Mouse 轨迹球实际上在 XFCE4 中运行完美:激活鼠标中键模拟复制粘贴并使用右侧小按钮滚动)。告诉我你想看哪一个。

只需尝试在 askubuntu 等中找到的所有配置建议,至少会有一个解决方案起作用。

相同的想法,同样奇怪的措辞:

Chrome/Chromium 鼠标中键用于滚动 Linux、Mac

您知道这个吗?

https://help.ubuntu.com/community/Logitech_Marblemouse_USB

值得称赞的是:在我看来,开发人员听取了大家的意见,并在 Ubuntu 18.10 中默认启用了鼠标中键模拟。感谢聪明的家伙,这大大减少了现代发行版中的愚蠢痛点。

答案2

有点晚了,但这可能会起作用:

#!/bin/bash
DEVICE="Logitech USB Trackball"
# Buttons are:
# 1 - Large left
# 8 - Small left
# 9 - Small right
# 3 - Large right

# Properties BEFORE
echo =================================================================
xinput --list-props     "${DEVICE}"

# Exchange 8 with middle-click (2), so, middle-clicking opens a new page in browser
xinput --set-button-map "${DEVICE}"  1 8 3 4 5 6 7 2 9

# Left-small button-press scrolls:
xinput --set-prop "${DEVICE}" "libinput Button Scrolling Button" 8

# NO Natural Scrolling: finger goes down, scrollbar button goes down, page moves upwards
xinput --set-prop "${DEVICE}" "libinput Natural Scrolling Enabled" 0

# Scroll Methods has three values that can be enabled and disabled: 1) Two-finger scrolling, 2) Edge scrolling and 3) On-Button scrolling.
# Only 0, 0, 0 and 0, 0, 1 are available for this trackball, or else an error raises.
xinput --set-prop "${DEVICE}" "libinput Scroll Method Enabled" 0, 0, 1

# This setting makes the scroll button enable/disable at each click
xinput --set-prop "${DEVICE}" 'libinput Button Scrolling Button Lock Enabled' 0

echo =================================================================
xinput --list-props     "${DEVICE}"

这很有帮助:

相关内容