golang desktop controller library
- screenshot
- keyboard/mouse events
- scroll events
- clipboard get/set(only supported text data)
supported system
- linux(x11)
- windows
- macos
cli, _ := rdesktop.New()
cli.ShowCursor(true) // show the cursor image
img, err := cli.Screenshot()
// use of img
cli, _ := rdesktop.New()
cli.MouseMove(100, 100) // move mouse to 100,100
cli.ToggleMouse(rdesktop.MouseLeft, true) // mouse left button press down
cli.ToggleMouse(rdesktop.MouseLeft, false) // mouse left button press up
cli.Scroll(0, -100) // scroll down 100 pixel
cli, _ := rdesktop.New()
cli.ToggleKey("control", true) // press down ctrl
cli.ToggleKey("a", true) // press down a
cli.ToggleKey("control", false) // press up ctrl
cli.ToggleKey("a", false) // press up a
cli, _ := rdesktop.New()
cli.ClipboardSet("hello") // set "hello" text to clipboard
data, _ := cli.ClipboardGet() // get clipboard data
cli, _ := rdesktop.New()
img, err := cli.GetCursor()
// use of img