diff --git a/IPython/html/static/notebook/js/keyboardmanager.js b/IPython/html/static/notebook/js/keyboardmanager.js index dba3b91..2a356f2 100644 --- a/IPython/html/static/notebook/js/keyboardmanager.js +++ b/IPython/html/static/notebook/js/keyboardmanager.js @@ -167,7 +167,6 @@ var IPython = (function (IPython) { }; } }, - } // Command mode defaults @@ -204,6 +203,30 @@ var IPython = (function (IPython) { return false; } }, + 'k' : { + help : 'select previous cell', + handler : function (event) { + var index = IPython.notebook.get_selected_index(); + if (index !== 0 && index !== null) { + IPython.notebook.select_prev(); + var cell = IPython.notebook.get_selected_cell(); + cell.focus_cell(); + }; + return false; + } + }, + 'j' : { + help : 'select next cell', + handler : function (event) { + var index = IPython.notebook.get_selected_index(); + if (index !== (IPython.notebook.ncells()-1) && index !== null) { + IPython.notebook.select_next(); + var cell = IPython.notebook.get_selected_cell(); + cell.focus_cell(); + }; + return false; + } + }, 'x' : { help : 'cut cell', handler : function (event) {