1.0.3 • Published 4 years ago

global-keys v1.0.3

Weekly downloads
1
License
GPLv3
Repository
github
Last release
4 years ago

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
});