How to add keyboard shortcuts permanently to Jupyter (ipython) notebook?
In the new version of Jupyter notebook (update it either with pip install --upgrade notebook
or if you use conda conda upgrade notebook
), you can customize them from the notebook itself.
To do this Help -> Edit keyboard shortcuts
custom.js is the correct place for this code. Try wrapping it as follows (don't forget the return true
before the end of the block):
$([IPython.events]).on("app_initialized.NotebookApp", function () {
<your code>
return true;
});