diff --git a/IPython/html/static/base/js/keyboard.js b/IPython/html/static/base/js/keyboard.js index 4fa77d5..37ab3e3 100644 --- a/IPython/html/static/base/js/keyboard.js +++ b/IPython/html/static/base/js/keyboard.js @@ -134,7 +134,7 @@ IPython.keyboard = (function (IPython) { element = $(element); var event = shortcut_to_event(shortcut, 'keydown'); element.trigger(event); - }; + } // Shortcut manager class @@ -192,7 +192,7 @@ IPython.keyboard = (function (IPython) { if (!suppress_help_update) { // update the keyboard shortcuts notebook help $([IPython.events]).trigger('rebuild.QuickHelp'); - } + } }; ShortcutManager.prototype.add_shortcuts = function (data) { @@ -210,7 +210,7 @@ IPython.keyboard = (function (IPython) { if (!suppress_help_update) { // update the keyboard shortcuts notebook help $([IPython.events]).trigger('rebuild.QuickHelp'); - } + } }; ShortcutManager.prototype.count_handler = function (shortcut, event, data) { diff --git a/IPython/html/tests/util.js b/IPython/html/tests/util.js index 836b717..c197a7c 100644 --- a/IPython/html/tests/util.js +++ b/IPython/html/tests/util.js @@ -306,7 +306,9 @@ casper.focus_notebook = function() { casper.trigger_keydown = function() { for (var i = 0; i < arguments.length; i++) { this.evaluate(function (k) { - IPython.keyboard.trigger_keydown(k); + var element = $(document); + var event = IPython.keyboard.shortcut_to_event(k, 'keydown'); + element.trigger(event); }, {k: arguments[i]}); } };