active-keys

Know and listen for which keys the user is currently holding down using standard KeyboardEvent#key values.

npm install --save active-keys

import keyWatcher from 'active-keys';
keyWatcher.addEventListener('change', () => {
  console.log(Object.keys(keyWatcher.activeKeys));
});

Live Example

API Docs and Example Code

Demo Recording