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: 17 days 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 (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-09T03:48:45.000Z (over 1 year ago)
- Last Synced: 2024-10-12T04:44:45.831Z (about 1 month 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
[![rdesktop](https://github.com/lwch/rdesktop/actions/workflows/build.yml/badge.svg)](https://github.com/lwch/rdesktop/actions/workflows/build.yml)
[![Go Reference](https://pkg.go.dev/badge/github.com/lwch/rdesktop.svg)](https://pkg.go.dev/github.com/lwch/rdesktop)
[![Go Report Card](https://goreportcard.com/badge/github.com/lwch/rdesktop)](https://goreportcard.com/report/github.com/lwch/rdesktop)
[![go-mod](https://img.shields.io/github/go-mod/go-version/lwch/rdesktop)](https://github.com/lwch/rdesktop)
[![license](https://img.shields.io/github/license/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