21 lines
324 B
Go
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)
|
|
}
|