我的鼠标滚轮有自己的意识,我想禁用它,我尝试过在线搜索,但只找到了过时的帖子。我的 Ubuntu 版本是 22.04 LTS 和 X11。如果可能的话,我还想重新映射鼠标的侧键以上下滚动。我该怎么做?如果可以使用 AutoKey,我希望有人向我解释如何使用它,因为我不知道。
答案1
不幸的是,ubuntu 没有 GUI 选项来配置鼠标滚动速度。
其中一种方法是:
通过运行安装 imwheel:
安装 imwheel
使用来自的脚本www.nicknorton.net/mousewheel.sh:
在终端中运行:
bash <(curl -s http://www.nicknorton.net/mousewheel.sh)
或先创建
#!/bin/bash
# Version 0.1 Tuesday, 07 May 2013
# Comments and complaints http://www.nicknorton.net
# GUI for mouse wheel speed using imwheel in Gnome
# imwheel needs to be installed for this script to work
# sudo apt-get install imwheel
# Pretty much hard wired to only use a mouse with
# left, right and wheel in the middle.
# If you have a mouse with complications or special needs,
# use the command xev to find what your wheel does.
#
### see if imwheel config exists, if not create it ###
if [ ! -f ~/.imwheelrc ]
then
cat >~/.imwheelrc<<EOF
".*"
None, Up, Button4, 1
None, Down, Button5, 1
Control_L, Up, Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L, Up, Shift_L|Button4
Shift_L, Down, Shift_L|Button5
EOF
fi
##########################################################
CURRENT_VALUE=$(awk -F 'Button4,' '{print $2}' ~/.imwheelrc)
NEW_VALUE=$(zenity --scale --window-icon=info --ok-label=Apply --title="Wheelies" --text "Mouse wheel speed:" --min-value=1 --max-value=100 --value="$CURRENT_VALUE" --step 1)
if [ "$NEW_VALUE" == "" ];
then exit 0
fi
sed -i "s/\($TARGET_KEY *Button4, *\).*/\1$NEW_VALUE/" ~/.imwheelrc # find the string Button4, and write new value.
sed -i "s/\($TARGET_KEY *Button5, *\).*/\1$NEW_VALUE/" ~/.imwheelrc # find the string Button5, and write new value.
cat ~/.imwheelrc
imwheel -kill
注意
几乎只能使用带有左、右和中间滚轮的鼠标。如果您的鼠标功能复杂或有特殊需求,请使用命令 xev 查找滚轮的功能。
参考