Reputation: 1240
I want to enter in command mode using a different key than ESC
. Searching for how to do that, I find only stuff on how to change the command mode shortcuts, but not how to change the keystroke for entering the command mode itself.
How can one change the shortcuts to enter command mode in Jupyter?
Upvotes: 1
Views: 1810
Reputation: 43
When inside jupyterlab:
Settings -> Advanced Settings Editor -> Keyboard Shortcuts
Two windows should pop up “system defaults” and “user preferences”. In the user preferences side you can paste this code.
{
"shortcuts":[
{
"command": "notebook:enter-command-mode",
"keys": [
"Ctrl 1"
],
"selector": ".jp-Notebook.jp-mod-editMode",
"title": "Enter Command Mode Ipad"
}
]
}
You can change the “keys” portion to whatever you may like. This is extremely helpful if you are using Jupyter on an iPad that doesn’t have an escape key.
This article was pretty helpful on understanding what to do. Still not a hundred percent certain the in workings of this but it worked for me.
https://towardsdatascience.com/how-to-customize-jupyterlab-keyboard-shortcuts-72321f73753d
I specifically tested this in jupyterlab Inside jupyter go to Help -> edit keyboard shortcuts Then then have a gui that you can add a keyboard shortcut too. “Enter command mode”
Upvotes: 1