getkeystate

1.0.3 • Public • Published

GetKeyState

its Work in the same way as a GetKeyState() function used by a cpp file.

Installation

Use the package manager npm or yarn to install GetKeyState.

yarn add getkeystate
npm install getkeystate

Usage

const GetKeyState = require("getkeystate");
const Sleep = require("sleepcpp");

/* the params accept virtual key codes. See more in https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes */
while(GetKeyState(0x20) != 1){
//waiting space being pressed
   Sleep(200);
}  
console.log("space pressed");

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Package Sidebar

Install

npm i getkeystate

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

11 MB

Total Files

27

Last publish

Collaborators

  • deivid_reinke_schiitz