##// END OF EJS Templates
update notebook quickhelp on new shortcuts
Paul Ivanov -
Show More
@@ -174,7 +174,7 b' IPython.keyboard = (function (IPython) {'
174 this._shortcuts = {};
174 this._shortcuts = {};
175 }
175 }
176
176
177 ShortcutManager.prototype.add_shortcut = function (shortcut, data) {
177 ShortcutManager.prototype.add_shortcut = function (shortcut, data, suppress_help_update) {
178 if (typeof(data) === 'function') {
178 if (typeof(data) === 'function') {
179 data = {help: '', help_index: '', handler: data}
179 data = {help: '', help_index: '', handler: data}
180 }
180 }
@@ -187,12 +187,18 b' IPython.keyboard = (function (IPython) {'
187 shortcut = normalize_shortcut(shortcut);
187 shortcut = normalize_shortcut(shortcut);
188 this._counts[shortcut] = 0;
188 this._counts[shortcut] = 0;
189 this._shortcuts[shortcut] = data;
189 this._shortcuts[shortcut] = data;
190 if (!suppress_help_update) {
191 // update the keyboard shortcuts notebook help
192 IPython.quick_help = new IPython.QuickHelp();
193 }
190 }
194 }
191
195
192 ShortcutManager.prototype.add_shortcuts = function (data) {
196 ShortcutManager.prototype.add_shortcuts = function (data) {
193 for (var shortcut in data) {
197 for (var shortcut in data) {
194 this.add_shortcut(shortcut, data[shortcut]);
198 this.add_shortcut(shortcut, data[shortcut], True);
195 }
199 }
200 // update the keyboard shortcuts notebook help
201 IPython.quick_help = new IPython.QuickHelp();
196 }
202 }
197
203
198 ShortcutManager.prototype.remove_shortcut = function (shortcut) {
204 ShortcutManager.prototype.remove_shortcut = function (shortcut) {
General Comments 0
You need to be logged in to leave comments. Login now