Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lwch/rdesktop
golang desktop controller, supported windows, linux, macos.
https://github.com/lwch/rdesktop
automation clipboard golang keyboard mouse window
Last synced: 4 months ago
JSON representation
golang desktop controller, supported windows, linux, macos.
- Host: GitHub
- URL: https://github.com/lwch/rdesktop
- Owner: lwch
- License: mit
- Created: 2021-11-23T03:01:59.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-09T03:48:45.000Z (almost 2 years ago)
- Last Synced: 2024-10-12T04:44:45.831Z (4 months ago)
- Topics: automation, clipboard, golang, keyboard, mouse, window
- Language: Go
- Homepage:
- Size: 68.4 KB
- Stars: 37
- Watchers: 4
- Forks: 13
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rdesktop
[](https://github.com/lwch/rdesktop/actions/workflows/build.yml)
[](https://pkg.go.dev/github.com/lwch/rdesktop)
[](https://goreportcard.com/report/github.com/lwch/rdesktop)
[](https://github.com/lwch/rdesktop)
[](https://opensource.org/licenses/MIT)golang desktop controller library
- [x] screenshot
- [x] keyboard/mouse events
- [x] scroll events
- [x] clipboard get/set(only supported text data)supported system
- [x] linux(x11)
- [x] windows
- [x] macos## screenshot
cli, _ := rdesktop.New()
cli.ShowCursor(true) // show the cursor image
img, err := cli.Screenshot()
// use of img## mouse
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## keyboard
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## clipboard
cli, _ := rdesktop.New()
cli.ClipboardSet("hello") // set "hello" text to clipboard
data, _ := cli.ClipboardGet() // get clipboard data## cursor image
cli, _ := rdesktop.New()
img, err := cli.GetCursor()
// use of img