禁用鼠标移动而不禁用单击和滚动?
是否可以在不禁用单击和滚动的情况下禁用鼠标移动? 我想让鼠标指针冻结在某一点,但点击并使用滚轮滚动应该工作。
有一个xinput
命令可以操作X设备,其列表可以通过它获得
xinput --list
因此,对于假设的鼠标, id=10
,这对于现代Xorg版本来说似乎是正确的 。
解决方案(使用属性名称) :
xinput set-prop 10 'Device Accel Constant Deceleration' 65535
恢复正常:
xinput set-prop 10 'Device Accel Constant Deceleration' 1
解决方案(使用属性编号):
xinput list-props 10
找
Device Accel Constant Deceleration (
p ):
在输出列表中,其中p是十进制数。 现在将其替换为:
xinput set-prop 10
p 65535
恢复正常:
xinput set-prop 10
p 1
游戏很晚,但这里的低技术解决方案是在你的鼠标灯上放一点胶带。 这将“禁用”指针但保持按钮处于活动状态,并且不会弄乱xinput设置。