sendinput
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

sendinput

This module enables you to send INPUTS via SendInput (win32 api) function. Therefore it is Windows only. Currently only keyboard input are supported, you can send VirtualKeys, ScanCodes and Unicode.

API is described by Typescript definition:

enum KBDInputType{
    VirtualKey = 0, ScanCode = 1, Unicode = 2
}
interface KBDInput{
    up: boolean;
    val: number;
    type: KBDInputType;
}
function SendInput(inputs: Array<KBDInput>|KBDInput);

You should only pass single bytes when sending a scancode input, however you may send two bytes, if the first byte is a 0xe0.

Readme

Keywords

none

Package Sidebar

Install

npm i sendinput

Weekly Downloads

3

Version

0.2.0

License

MIT

Unpacked Size

8.17 kB

Total Files

7

Last publish

Collaborators

  • lal12