Merge pull request #2104 from Carreau/shortcut-edit-menu

Add a menu item to edit keyboard shortcuts.
Thomas Kluyver 9 years ago committed by GitHub
commit 8fbf1fb1ce

@ -7,6 +7,26 @@
"# Keyboard Shortcut Customization"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Starting with Jupyter Notebook 5.0, you can customize the `command` mode shortcuts from within the Notebook Application itself. \n",
"\n",
"Head to the **`Help`** menu and select the **`Edit keyboard Shortcuts`** item.\n",
"A dialog will guide you through the process of adding custom keyboard shortcuts.\n",
"\n",
"Keyboard shortcut set from within the Notebook Application will be persisted to your configuration file. \n",
"A single action may have several shortcuts attached to it."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Keyboard Shortcut Customization (Pre Notebook 5.0)"
]
},
{
"cell_type": "markdown",
"metadata": {},
@ -17,9 +37,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"%%javascript\n",
@ -55,9 +73,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"%%javascript\n",
@ -78,9 +94,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"%%javascript\n",
@ -107,9 +121,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"%%javascript\n",
@ -134,9 +146,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.4.3"
"version": "3.5.2"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}

@ -288,6 +288,7 @@ define([
'#copy_cell_attachments': 'copy-cell-attachments',
'#paste_cell_attachments': 'paste-cell-attachments',
'#insert_image': 'insert-image',
'#edit_keyboard_shortcuts' : 'edit-command-mode-keyboard-shortcuts',
};
for(var idx in id_actions_dict){

@ -115,8 +115,11 @@ var KeyBindingList = createClass({
"\n\nYou can combine the two: `Ctrl-x,Meta-c,Meta-b,u,t,t,e,r,f,l,y`.\n"+
"Casing will have no effects: (e.g: `;` and `:` are the same on english keyboards)."+
" You need to explicitelty write the `Shift` modifier.\n"+
"Valid modifiers are `Cmd`, `Ctrl`, `Alt` ,`Meta`, `Cmdtrl`. Refer to developper docs "+
"for their signification depending on the platform."
"Valid modifiers are `Cmd`, `Ctrl`, `Alt` ,`Meta`, `Cmdtrl`. Refer to developer docs "+
"for the corresponding keys depending on the platform."+
"You can hover on the name/description of a command to see its exact internal name and "+
"differentiate from actions defined in various plugins. Changing the "+
"keybindings of edit mode is not yet possible."
)}
}));
return createElement('div',{}, childrens);

@ -285,7 +285,8 @@ data-notebook-path="{{notebook_path | urlencode}}"
<ul id="help_menu" class="dropdown-menu">
{% block help %}
<li id="notebook_tour" title="A quick tour of the notebook user interface"><a href="#">User Interface Tour</a></li>
<li id="keyboard_shortcuts" title="Opens a tooltip with all keyboard shortcuts"><a href="#">Keyboard Shortcuts</a></li>
<li id="keyboard_shortcuts" title="Opens a dialog which shows all keyboard shortcuts"><a href="#">Keyboard Shortcuts</a></li>
<li id="edit_keyboard_shortcuts" title="Opens a dialog allowing you to edit Keyboard shortcuts"><a href="#">Edit Keyboard Shortcuts</a></li>
<li class="divider"></li>
{% set
sections = (

Loading…
Cancel
Save