# node-win32-keyhook

> Create a hook for keypresses in windows

Latest version **1.0.7** (published 2015-12-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-win32-keyhook
pnpm add node-win32-keyhook
yarn add node-win32-keyhook
bun add node-win32-keyhook
```

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2015-12-12 |
| First published | 2015-12-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 10 |
| Author | Yannick de Jong |
| Maintainers | yannicked |

## Links

- npm: https://www.npmjs.com/package/node-win32-keyhook
- Repository: https://github.com/Yannicked/node-win32-keyhook
- Homepage: https://github.com/Yannicked/node-win32-keyhook#readme
- Issues: https://github.com/Yannicked/node-win32-keyhook/issues
- npm.io page: https://npm.io/package/node-win32-keyhook

## Dependencies (2)

- [ffi](https://npm.io/package/ffi.md) git+https://github.com/Yannicked/node-ffi.git
- [ref](https://npm.io/package/ref.md) ^1.3.1

## Recent versions

- 1.0.7 (latest) — 2015-12-12
- 1.0.6 — 2015-12-11
- 1.0.5 — 2015-12-11
- 1.0.4 — 2015-12-11
- 1.0.3 — 2015-12-11
- 1.0.2 — 2015-12-11
- 1.0.1 — 2015-12-11
- 1.0.0 — 2015-12-11

## README

node-win32-keyhook
========
### Node.js Windows keyhook
`node-win32-keyhook` is a library which lets you create a windows hook which will send all the keyboard input to a callback with the [Virtual-Key Code](https://msdn.microsoft.com/pt-br/library/windows/desktop/dd375731(v=vs.85).aspx) as an argument

Example
-------

``` js
var keyhook = require('node-win32-keyhook');

function key_down(keycode) { // A function that converts the keycode to hexadecimal notation
    console.log('Key Down: 0x'+parseInt(keycode).toString(16))
}

function key_up(keycode) { // A function that converts the keycode to hexadecimal notation
    console.log('Key Up: 0x'+parseInt(keycode).toString(16))
}

keyhook.create(key_down, key_up); // Create the hook, and set the key_down and key_up callback

keyhook.destroy(); // Remove the hook



```
Requirements
------------

 * Windows, of course
 * ```DotNet 4.0``` for building the dynamic library

Installation
------------

Make sure you've installed all the necessary build
tools,
then run this command in the source directory:

``` bash
$ npm install node-win32-keyhook
```

---
_Source: https://npm.io/package/node-win32-keyhook · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
