macos-keyboard-mouse
v1.0.2
Published
Native Keyboard and Mouse controls for your Node application.
Downloads
12
Maintainers
Readme
MacOS Keyboard Mouse
Keyboard and mouse controls for your Node project. Currently, supports only Mac.
Libraries:
- node-addon-api - interface for building native addons
- cmake-js - native addon build tool which works like
node-gyp
Example
Mouse
import { Mouse } from 'macos-keyboard-mouse';
const mouse = new Mouse();
// sets delay between pixels
mouse.setDelay(16);
// moves mouse to x: 100, y: 100
mouse.move(100, 100);
Keyboard
import { Keyboard } from 'macos-keyboard-mouse';
const keyboard = new Keyboard();
// types 'hello world'
keyboard.type('Hello world');