1.0.3 • Published 3 years ago

getkeystate v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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.

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago