hotkeys-js
hotkeys-js copied to clipboard
cmd+s on MacOs
on Mac, cmd+s
is still triggering the browser shortcut to save the HTML file of the current page.
I need to give the focus with the mouse to the page itself to make it work. Is there a way to go around that?
(function(){
hotkeys('ctrl+s, cmd+s', (event, handler) => {
event.preventDefault();
console.log('Saving...);
return false;
});
})();
The hotkey itself is bound to the page. According to what you described, you seem to focus on the page (e.g, devTools).