[英]Changing mouse sensitivity/dpi on Linux using python
Is there a way to change mouse sensitivity/dpi on Linux using python?有没有办法使用 python 更改 Linux 上的鼠标灵敏度/dpi?
I am using Ubuntu 18.04.3我正在使用 Ubuntu 18.04.3
If there are other ways that don't use python, please be kind enough to tell me如果还有其他不使用 python 的方式,请告诉我
Try this:尝试这个:
from psychopy import visual, event
mywin = visual.Window((800,800),
monitor='testMonitor',
units='pix',
fullscr=False)
topo = event.Mouse(win=mywin)
speed = 3 # change this parameter to change speed
c = 0
while any(topo.getPressed()) != True:
if c % speed == 0:
pos = topo.getPos()
topo.setPos(pos)
mywin.flip()
c += 1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.