-
-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rebind keys from an unbound scope or enable / disable scopes #429
Comments
By unbound scope do you mean the "all" scope that is the default scope if the scope is not specified? Assuming the setScope('modal') function is called before the all scope, it would be nice to be able to call hotkeys.stopPropigation(). This would run only the setScope('modal') bound function and not run the If you have bindings that need to be disabled, they should go in a scope other than all. If the same bindings need to be enabled in multiple scopes but need to be disabled as well, I am not sure what is used to disable a setScope() call. I assume setScope('') or setScope(null), setScope() or |
I got around this by never assigning any hotkeys to the 'all' scope. So what I do, is all my general purpose hotkeys get assigned to a scope called 'global', and I set that scope pretty much on page load. Then when I load a modal, I create a new scope, set the new scope to be active, when the modal closes, I delete the new scope and set the scope back to 'global'. I too wish that 'all' could be enabled/disabled.
From what I have found, the 'all' scope takes priority over the scope you just set. Which is why I stopped using the 'all' scope. |
Hello,
Is there a way to rebind keys from an unbound scope?
for example I have set some hot keys and they are scoped. then I open a modal and I set the scope to that modal scope.
But I have to unbind the other scope else both ('enter') hotkeys will be fired.
after the modal is closed then the hotkeys don't work on the root element anymore because they are unbound.
Or is there a way to somehow disable and enable scopes?
The text was updated successfully, but these errors were encountered: