Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucassklp/Desktop.Robot
A library used to control your mouse and keyboard programmatically in .NET Core
https://github.com/lucassklp/Desktop.Robot
autoclicker dotnet dotnet-core java-robot keyboard keyboard-emulation keyboards linux mouse mouse-emulation mouse-pointer mousemove osx robot simulation
Last synced: 7 days ago
JSON representation
A library used to control your mouse and keyboard programmatically in .NET Core
- Host: GitHub
- URL: https://github.com/lucassklp/Desktop.Robot
- Owner: lucassklp
- License: mit
- Created: 2021-01-25T10:14:47.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-19T18:14:00.000Z (3 months ago)
- Last Synced: 2024-10-13T14:24:16.923Z (about 1 month ago)
- Topics: autoclicker, dotnet, dotnet-core, java-robot, keyboard, keyboard-emulation, keyboards, linux, mouse, mouse-emulation, mouse-pointer, mousemove, osx, robot, simulation
- Language: C#
- Homepage:
- Size: 8.39 MB
- Stars: 141
- Watchers: 7
- Forks: 25
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Desktop.Robot
This library helps you to automate tasks by simulating inputs (mouse and keyboards) programmatically, inspired in [java.awt.Robot](https://docs.oracle.com/javase/7/docs/api/java/awt/Robot.html)
I made this library because the dotnet SDK doesn't support simulation of mouse and keyboard input. The only way of input simulation in the standard framework is by using Windows.Forms which won't run on Linux or OSX.
## Installation
If you are using Package Manager:
```bash
Install-Package Desktop.Robot -Version 1.5.0
```If you are using .NET CLI
```bash
dotnet add package Desktop.Robot --version 1.5.0
```## Advantages
- Multiplatform: works on Windows, Linux and OSX
- Built using the Operating System Native and .NET API, other dependencies needed
- Easy to use## Example of use
```csharp
using Desktop.Robot;
using Desktop.Robot.Extensions;
namespace Example
{
class Program
{
static void Main(string[] args)
{
var robot = new Robot();
robot.AutoDelay = 1000;
robot.MouseMove(100, 100);
robot.Click();
robot.Type("A invisible cat is using my PC");
}
}
}
```## Remarks
In order to use the method CreateScreenCapture you will need to install some libraries. This is required by System.Drawing's components### Installing the requirements on Linux
```
sudo apt install libgdiplus
```## Current limitations
1. As we are currently developing this tool, multiple monitors are not supported for now.
2. The library is under development, and some methods will throw a NotImplementedException