Adding shift-enter support.

Brian Granger 15 years ago committed by Brian E. Granger
parent 360b6bf6ab
commit 94647cfbb1

@ -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();
}
});
};

Loading…
Cancel
Save