keymaster
keymaster copied to clipboard
Add support for dash ( - ), equals ( = ), and semicolon ( ; ) in Firefox
Would this help?
// ctrl + "=", can't listen to pure =
key('ctrl+0', function(event, handler){
console.log(handler.shortcut, handler.scope);
});
// =
key('shift+0', function(event, handler){
console.log(handler.shortcut, handler.scope);
});
// shift+;
key('shift+ctrl+,', function(event, handler){
console.log(key.shift,handler.shortcut, handler.scope);
});
document.addEventListener('keypress', (event) => {
// -
if(key.isPressed(173)){
// whatever
console.log('whatever')
}
});