hotkeys-js icon indicating copy to clipboard operation
hotkeys-js copied to clipboard

cmd+s on MacOs

Open chrisvidal opened this issue 2 years ago • 1 comments

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

chrisvidal avatar Aug 02 '22 09:08 chrisvidal

The hotkey itself is bound to the page. According to what you described, you seem to focus on the page (e.g, devTools).

xlboy avatar Aug 28 '22 17:08 xlboy