mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Adding shift-enter support.
This commit is contained in:
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…
Reference in New Issue
Block a user