Skip to content

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.

License

Notifications You must be signed in to change notification settings

enfp-dev-studio/napi-rs-enigo

Repository files navigation

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

  • 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:

yarn add @enfpdev/napi-rs-enigo

Usage

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 ☕️

Buy Me A Coffee

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published