dummy-pointer/dummy-pointer.go
2022-01-15 18:28:55 -08:00

21 lines
324 B
Go

package main
import (
"os"
"os/signal"
"syscall"
"github.com/bendahl/uinput"
)
func main() {
mouse, err := uinput.CreateMouse("/dev/uinput", []byte("dummy-pointer"))
if err != nil {
os.Exit(1)
}
sc := make(chan os.Signal, 1)
signal.Notify(sc, syscall.SIGINT, syscall.SIGTERM)
<-sc
mouse.Close()
os.Exit(0)
}