##// END OF EJS Templates
Adding shift-enter support.
Brian Granger -
Show More
@@ -17,11 +17,14 b' var Notebook = function (selector) {'
17 Notebook.prototype.bind_events = function () {
17 Notebook.prototype.bind_events = function () {
18 var that = this;
18 var that = this;
19 that.element.keydown(function (event) {
19 that.element.keydown(function (event) {
20 // console.log(event);
20 console.log(event);
21 if (event.which == 38 && event.shiftKey) {
21 if (event.which == 38 && event.shiftKey) {
22 that.select_prev();
22 that.select_prev();
23 } else if (event.which == 40 && event.shiftKey) {
23 } else if (event.which == 40 && event.shiftKey) {
24 that.select_next();
24 that.select_next();
25 } else if (event.which == 13 && event.shiftKey) {
26 // The focus is not quite working here.
27 that.insert_code_cell_after();
25 }
28 }
26 });
29 });
27 };
30 };
General Comments 0
You need to be logged in to leave comments. Login now