mouse
This library allows you to programmatically control the mouse.
Installing
nimble install mouse
arch: pacman -S xdotool
ubuntu/debian: apt-get install xdotool
fedora: dnf install xdotool
openSUSE: zypper install xdotool
other: brew install xdotool
brew install xdotool
Suported platforms
Platform | Is supported |
---|---|
Windows | |
Linux | |
Mac |
Examples
Universal
import mouse
click(Left)
press(Left)
release(Left)
move(30, 30)
while true:
var position = getPos()
echo fmt"position: {position}"
Windows-only
import mouse
scroll(5)