I’ve use jQuery hotkey.js plugin in my application to support shortcut keys.
But, currently seems it only support key combinations like “ctrl+a”,”shift+a”,”alt+a”… I’ve tried
$(document).bind('keypress','g+g',fn);
or
$(document).bind('keypress','g,g',fn);
or even
$(document).bind('keypress','g','g',fn);
but non of them work.
My question would be what can I do to support this kind of hotkeys?
Thank you very much.
Shortcut.js only supports a modifier key (alt, ctrl, meta, shift) + another key. It does not support multiple non-modifier keys (e.g
r+g, or evenctrl+e+f(proof case)).Have a look at the linked answer for another method to achieve the desired effect.
SO answer: Listen to multiple keydowns