Closed gossi closed 7 years ago
@gossi we don't currently expose an option to disable/enable shortcuts based on whether or not there is a focused textarea or input. We manage this on a one-off basis per shortcut by checking document.activeElement
.
I'd be interested in adding this as a feature. Would you find it more useful to be able to globally disable shortcuts any time an input has focus? Or would you want to be able to granularly disable per shortcut?
Cool! For me particular, a global option would be nice. However, since this is a general purpose plugin, both options should be available, you never know how one will be using your plugin.
Gotcha. Thanks for the info!
Closing this as we have merged the updates with the global config and register flag to disable when an input element is active.
@gossi please let me know if the new option works for you.
I just implemented it and it's a bless. I love you guys! Awesome job.
At the moment I'm using my own method for listening on key events globally. This interferes with text inputs where I pause and resume my global listener on their focus and blur events. I do this manually. Can your plugin help me with that? That this will ignore key events on text inputs, when global once are registered?