KeyboardJS icon indicating copy to clipboard operation
KeyboardJS copied to clipboard

Listen for combo by key exclusion rather than inclusion

Open PrimozRome opened this issue 9 years ago • 3 comments

I would like to add keyboard listener for any key press except enter, space, shift, alt, ctrl, tab? Is this possible with KeyboardJS?

PrimozRome avatar Mar 26 '16 15:03 PrimozRome

How do you handle space or enter with it, tried: keyboardJS.bind(' ', (e) => { console.log(e); });

But it is not working.

iongion avatar May 18 '16 15:05 iongion

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

RobertWHurst avatar May 19 '16 05:05 RobertWHurst

@PrimozRome It's not possible at this time, but It's not a bad idea for a feature at some point.

RobertWHurst avatar May 30 '16 08:05 RobertWHurst