https://github.com/antelle/node-keyboard-auto-type
Node.js bindings for keyboard-auto-type
https://github.com/antelle/node-keyboard-auto-type
Last synced: 6 months ago
JSON representation
Node.js bindings for keyboard-auto-type
- Host: GitHub
- URL: https://github.com/antelle/node-keyboard-auto-type
- Owner: antelle
- License: mit
- Created: 2021-01-30T08:45:05.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-17T16:41:57.000Z (about 4 years ago)
- Last Synced: 2024-12-11T21:38:54.223Z (6 months ago)
- Language: C++
- Size: 331 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Node.js bindings for keyboard-auto-type
This project exposes [keyboard-auto-type](https://github.com/antelle/keyboard-auto-type) as Node.js API.
## Installation
```sh
npm i keyboard-auto-type
```## Usage
You will find more docs in [keyboard-auto-type](https://github.com/antelle/keyboard-auto-type#usage) project. Here's how to use it in Node.js:
```js
const { AutoType, KeyCode, Modifier } = require('keyboard-auto-type');const typer = new AutoType();
// get active window
const win = typer.activeWindow({ getWindowTitle: true, getBrowserUrl: true });
// print something
console.log('Going to type in this window', win);// type some text
typer.text('Hello');
// press shift+1
typer.keyPress(KeyCode.D1, Modifier.Shift);
// select all
typer.shortcut(KeyCode.A);
```## Feedback
Do you need a binding that is missing? Please create an issue here, I'll add it!
Found a bug in the implementation? Go to [keyboard-auto-type](https://github.com/antelle/keyboard-auto-type), I'll be happy to help you there.
## License
[MIT](LICENSE)