From 9e95afe20278c2a6123cfc87962c3c268f76d8b0 2011-07-21 03:42:31 From: Brian Granger Date: 2011-07-21 03:42:31 Subject: [PATCH] Adding shift-enter support. --- diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js index 03910e0..a5950ca 100644 --- a/IPython/frontend/html/notebook/static/js/notebook.js +++ b/IPython/frontend/html/notebook/static/js/notebook.js @@ -17,11 +17,14 @@ var Notebook = function (selector) { Notebook.prototype.bind_events = function () { var that = this; that.element.keydown(function (event) { - // console.log(event); + console.log(event); if (event.which == 38 && event.shiftKey) { that.select_prev(); } else if (event.which == 40 && event.shiftKey) { that.select_next(); + } else if (event.which == 13 && event.shiftKey) { + // The focus is not quite working here. + that.insert_code_cell_after(); } }); };