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

1.0.3 • Public • Published

global-keys

This is a wrapper around my other program keys used to get access to global keypress data. This is a very simple implementation and will hopefully be improved and fleshed out later.

const keys = require('global-keys');
const keyStream = new keys.KeyStream();
 
keyStream.on('data', state => {
    console.log(state); // array of ascii codes
});
 
keyStream.on('error', error => {
    // handle errors
});

Package Sidebar

Install

npm i global-keys

Weekly Downloads

4

Version

1.0.3

License

GPLv3

Unpacked Size

197 kB

Total Files

6

Last publish

Collaborators

  • quantumcoded