https://github.com/enfp-dev-studio/napi-rs-enigo
A simple Node.js native module for mouse input events, developed by wrapping the Enigo library, which is a native input library in Rust for Keyboard and Mouse inputs. This module supports both Windows and macOS platforms.
https://github.com/enfp-dev-studio/napi-rs-enigo
darwin electron enigo keyboard mouse napi-rs native node nodejs nutjs
Last synced: 10 months ago
JSON representation
A simple Node.js native module for mouse input events, developed by wrapping the Enigo library, which is a native input library in Rust for Keyboard and Mouse inputs. This module supports both Windows and macOS platforms.
- Host: GitHub
- URL: https://github.com/enfp-dev-studio/napi-rs-enigo
- Owner: enfp-dev-studio
- License: mit
- Created: 2024-06-11T20:19:20.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-19T13:26:06.000Z (over 1 year ago)
- Last Synced: 2025-08-18T05:43:46.975Z (10 months ago)
- Topics: darwin, electron, enigo, keyboard, mouse, napi-rs, native, node, nodejs, nutjs
- Language: Rust
- Homepage:
- Size: 374 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# napi-rs-enigo: Node.js Wrapper for Enigo
A Node.js wrapper for the Enigo Rust library, providing a native interface for simulating input events like keyboard and mouse actions.
## Features
- [x] Simulate mouse events (move, click, scroll).
- [ ] Simulate keyboard events (press, release, type).
## Requirements
- Node.js 10 or later
- Rust toolchain
## Installation
Use npm to install the library:
```shell
yarn add @enfpdev/napi-rs-enigo
```
## Usage
```typescript
import {
moveMouseRel,
moveMouseAbs,
mouseClick,
mouseDown,
mouseUp,
mouseScroll
} from "napi-rs-enigo"
moveMouseRel(100, 100));
moveMouseAbs(100, 100));
mouseClick('rigtht'));
mouseDown('left'));
mouseUp('middle'));
mouseScroll(100, true));
```
## Contribute
Coffee fuels coding ☕️
