"Starting with IPython 2.0 keyboard shortcuts in command and edit mode are fully customizable. These customizations are made using the IPython JavaScript API. Here is an example that makes the `r` key available for running a cell:"
"Starting with IPython 2.0 keyboard shortcuts in command and edit mode are fully customizable. These customizations are made using the Jupyter JavaScript API. Here is an example that makes the `r` key available for running a cell:"
"The keypress `r` in command mode is by default bound to change the type of a cell ro `raw`. This action will thus be unavaillable from the keyboard now."
]
},
{
"cell_type": "markdown",
"metadata": {},
@ -55,7 +62,7 @@
"source": [
"%%javascript\n",
"\n",
"IPython.keyboard_manager.command_shortcuts.add_shortcut('r', function (event) {\n",
"Jupyter.keyboard_manager.command_shortcuts.add_shortcut('r', function (event) {\n",
"If you want your keyboard shortcuts to be active for all of your notebooks, put the above API calls into your `<profile>/static/custom/custom.js` file."
"If you want your keyboard shortcuts to be active for all of your notebooks, put the above API calls into your `custom.js` file."
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"Of course we provide name for majority of existing action so that you do not have to re-write everything, here is for example how to bind `r` back to it's initial behavior:"