brtnshrdr / angular2-hotkeys

Keyboard shortcuts for Angular 2 apps
MIT License
203 stars 95 forks source link

Cannot override chrome hotkeys on windows #114

Open bergermanuel opened 5 years ago

bergermanuel commented 5 years ago

We're using this library for hotkey support in our application but we're struggling with some special hotkeys. For example we add "ctrl+n" as an hotkey but on Windows pressing these keys will always open a new browser window of Chrome. When we test it on Mac it works well.

We're just calling add on HotkeyService with an hotkey instance. Are we missing something or is it not really possible to overwrite these shortcuts?

wittlock commented 5 years ago

Certain hotkeys used by the browser is just never passed on to the web application and can thus not be caught. Similar with Ctrl + number on Chrome and Firefox (used for switching tabs). I'm not too familiar with Macs, but I assume Ctrl + n is not how to open a new window there.

There just isn't much that can't be done about that I'm afraid. I should probably update the documentation to reflect this as you're not the first person asking about it.