KeyboardJS
KeyboardJS copied to clipboard
Listen for combo by key exclusion rather than inclusion
I would like to add keyboard listener for any key press except enter, space, shift, alt, ctrl, tab? Is this possible with KeyboardJS?
How do you handle space or enter with it, tried:
keyboardJS.bind(' ', (e) => { console.log(e); });
But it is not working.
you can type space. if you have a look at the us locale you can see all of the key names https://github.com/RobertWHurst/KeyboardJS/blob/master/locales/us.js
keyboardJS.bind('space', (e) => { console.log(e); });
@PrimozRome It's not possible at this time, but It's not a bad idea for a feature at some point.