From a324259c497b64d048802a20844d2195a2ea90ec Mon Sep 17 00:00:00 2001 From: "Brian E. Granger" Date: Fri, 10 Jan 2014 12:38:19 -0800 Subject: [PATCH] Minor changes to KB handling. --- IPython/html/static/notebook/js/keyboardmanager.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/IPython/html/static/notebook/js/keyboardmanager.js b/IPython/html/static/notebook/js/keyboardmanager.js index 5ac27dfb3..f8c43bad5 100644 --- a/IPython/html/static/notebook/js/keyboardmanager.js +++ b/IPython/html/static/notebook/js/keyboardmanager.js @@ -152,8 +152,8 @@ var IPython = (function (IPython) { } }, 'up' : { - help : 'select previous cell', - help_index : 'da', + help : '', + help_index : '', handler : function (event) { var cell = IPython.notebook.get_selected_cell(); if (cell && cell.at_top()) { @@ -166,8 +166,8 @@ var IPython = (function (IPython) { } }, 'down' : { - help : 'select next cell', - help_index : 'db', + help : '', + help_index : '', handler : function (event) { var cell = IPython.notebook.get_selected_cell(); if (cell && cell.at_bottom()) { @@ -548,7 +548,10 @@ var IPython = (function (IPython) { ShortcutManager.prototype.add_shortcut = function (shortcut, data) { if (typeof(data) === 'function') { - data = {help: '', handler: data} + data = {help: '', help_index: '', handler: data} + } + if (data.help_index === '') { + data.help_index = 'zz', } shortcut = this.normalize_shortcut(shortcut); this._shortcuts[shortcut] = data;