-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Can't add keyboard shortcuts to actions of extension #2954
Comments
I guess there's a race condition, that it's trying to add the shortcut before the extension has loaded and defined the action. It's a tricky one; it should be possible to bind a shortcut to an action name that hasn't been registered yet, but it's also nice to be able to catch incorrect action names. Maybe |
I though it was already the case by default; I'll have to re-check. |
The issue is that the The simple solution is to move all the actions/keyboard manager creation stuff into the Another approach woulds be to break out the adding of config shortcuts (vs. default shortcuts) to a new method on keyboard manager that could be called after extensions are loaded. |
When users bind custom shortcuts to actions coming from extensions, the shortcuts can be loaded before the extensions, so we need to allow defining a shortcut for an action that doesn't exist yet. Closes jupytergh-3549 Closes jupytergh-2954
We are developing https://github.com/NII-cloud-operation/Jupyter-multi_outputs
I can't add a keyboard shortcut to actions of this extension using Edit keyboard shortcuts.
The added keyboard shortcuts are enabled before reloading the notebook, but disabled with the following error after reloading.
Reproduction procedure:
This
MultiOutputs:pin_output
action is registered by the multi_outputs extension.https://github.com/NII-cloud-operation/Jupyter-multi_outputs/blob/master/lc_multi_outputs/nbextension/main.js#L604-L608
Could you give me some advice?
The text was updated successfully, but these errors were encountered: