KeyboardJS
KeyboardJS copied to clipboard
A JavaScript library for binding keyboard combos without the pain of key codes and key combo conflicts.
**Describe the bug** The type of the 'e' parameter is not exported, Although I can use any to get around ts, But it's not elegant **Example code** ```js keyboardjs.bind( 'a',...
Fix for issue #159 where the first keydown event does not fire if the preventRepeatByDefault parameter is set to true in bind.
`C:\Users\fahru\OneDrive\Desktop\Project\non-fullsize-keyboard-keymapping\node_modules\keyboardJS\dist\keyboard.js:614 throw new Error('Cannot find window functions addEventListener or attachEvent.');` It's showing this error when running it, even with the simplest code : `const keyboardJS = require('keyboardJS'); keyboardJS.on("n", function ()...
**Describe the bug** Listening secondary key symbols (!@#$%^&*()_+?) not firing event. However binding primary key together with secondary will work. **Example code** ```js let keys = ['!', '@', '#', '$',...
**Describe the bug** The callback gets called incorrectly on mac. **Example code** ```js keyboardJS.bind('c', () => console.log('c called!')); ``` - When I press `c`, it gets called, which is correct....
With preventRepeatByDefault=true, the first time the combo is pressed and released, only the releaseHandler is fired **Example code** ```js keyboardJS.bind('c', () => console.log('pressed c'), () => console.log('released c'), true) ```...
I'm building an 3D editor in the browser and attempting to use the following bindings: - `w` `a` `s` `d` to move the camera forward/back/strafe-left/strafe-right - `shift` to move the...
**What would you like to see added to KeyboardJS?** `keyboardJS.reset('contextName');` **What problem are you trying to solve?** How to unbind only the keys which belong to a specific context? Currently...
I would like to add keyboard listener for any key press except enter, space, shift, alt, ctrl, tab? Is this possible with KeyboardJS?