jaywcjlove / hotkeys-js

➷ A robust Javascript library for capturing keyboard input. It has no dependencies.
https://jaywcjlove.github.io/hotkeys-js
MIT License
6.66k stars 410 forks source link

Hotkey '+' and 'ctrl-+' not working #389

Open TheSteff5 opened 2 years ago

TheSteff5 commented 2 years ago

I am developing an angular app. I was testing my feature and noticed that the application is not reacting to the hotkeys '+' and 'ctrl-+'. According to the documentation it is necessary to define a different splitKey if you want to use the key '+' as a shortcut, but its not working. Is this a bug? For 'a' and 'ctrl-a' it is working. hotkeys('+,ctrl-+,a,ctrl-a', { splitKey: '-' }, function (event, handler) { event.preventDefault(); alert(event); });

In the documentation it says image

JeremyGeros commented 1 year ago

if you still having problems, I was running into the same issue. But realised that the key is '=' not +.

IE your code should be ctrl+= or = these work for me