Answers:
在UbuntuForums上讨论了可能的解决方法-您可以手动运行脚本以启用或禁用右键单击,具体取决于您是否使用基于Java的应用程序。
您可以-例如,将每个脚本连接为键盘快捷键,例如CTRL+ ALT+ E启用和CTRL+ ALT+ R禁用
创建一个名为“ hscroll_disable”的脚本,其中包含:
DEVICE_NAME='TPPS/2 IBM TrackPoint'
PROP_NAME='Evdev Wheel Emulation Axes'
xinput set-int-prop "$DEVICE_NAME" "$PROP_NAME" 8 4 5 4 5
if [[ $? -eq 0 ]] ; then
zenity --info --text "Horizontal Scrolling Disabled"
else
zenity --error --text "Error disabling horizontal scroll."
fi
创建一个名为“ hscroll_disable”的脚本,其中包含:
DEVICE_NAME='TPPS/2 IBM TrackPoint'
PROP_NAME='Evdev Wheel Emulation Axes'
xinput set-int-prop "$DEVICE_NAME" "$PROP_NAME" 8 6 7 4 5
if [[ $? -eq 0 ]] ; then
zenity --info --text "Horizontal Scrolling Enabled"
else
zenity --error --text "Error enabling horizontal scroll."
fi
授予两个脚本执行权限,即
chmod +x hscroll_disable
chmod +x hscroll_enable
脚本的两个重要部分是“ DEVICE_NAME”和“ PROP_NAME”
您可以像这样找出要在系统上使用的设备名称:
xinput list --short
这将产生类似于以下内容的输出:
"Virtual core pointer" id=0 [XPointer]
"Virtual core keyboard" id=1 [XKeyboard]
"ThinkPad Extra Buttons" id=2 [XExtensionKeyboard]
"AT Translated Set 2 keyboard" id=3 [XExtensionKeyboard]
"Video Bus" id=4 [XExtensionKeyboard]
"Macintosh mouse button emulation" id=5 [XExtensionPointer]
"TPPS/2 IBM TrackPoint" id=6 [XExtensionPointer]
然后找到属性名称:
xinput list-props "TPPS/2 IBM TrackPoint"
这将产生类似于以下内容的输出:
Device 'TPPS/2 IBM TrackPoint':
Device Enabled (93): 1
Evdev Axis Inversion (230): 0, 0
Evdev Reopen Attempts (227): 10
Evdev Axis Calibration (228):
Evdev Axes Swap (229): 0
Evdev Middle Button Emulation (231): 1
Evdev Middle Button Timeout (232): 50
Evdev Wheel Emulation (233): 1
Evdev Wheel Emulation Axes (234): 6, 7, 4, 5
Evdev Wheel Emulation Inertia (235): 10
Evdev Wheel Emulation Timeout (236): 200
Evdev Wheel Emulation Button (237): 2
Evdev Drag Lock Buttons (238): 0
上面的解决方案摘自“ vace117”