##// END OF EJS Templates
Merge pull request #2090 from v923z/master...
Bussonnier Matthias -
r7926:3a57667f merge
parent child Browse files
Show More
@@ -114,6 +114,14 b' var IPython = (function (IPython) {'
114 } else if (event.which === key.ENTER && event.shiftKey) {
114 } else if (event.which === key.ENTER && event.shiftKey) {
115 that.execute_selected_cell();
115 that.execute_selected_cell();
116 return false;
116 return false;
117 } else if (event.which === key.ENTER && event.altKey) {
118 // Execute code cell, and insert new in place
119 that.execute_selected_cell();
120 // Only insert a new cell, if we ended up in an already populated cell
121 if (/\S/.test(that.get_selected_cell().get_text()) == true) {
122 that.insert_cell_above('code');
123 }
124 return false;
117 } else if (event.which === key.ENTER && event.ctrlKey) {
125 } else if (event.which === key.ENTER && event.ctrlKey) {
118 that.execute_selected_cell({terminal:true});
126 that.execute_selected_cell({terminal:true});
119 return false;
127 return false;
@@ -28,6 +28,7 b' var IPython = (function (IPython) {'
28 var shortcuts = [
28 var shortcuts = [
29 {key: 'Shift-Enter', help: 'run cell'},
29 {key: 'Shift-Enter', help: 'run cell'},
30 {key: 'Ctrl-Enter', help: 'run cell in-place'},
30 {key: 'Ctrl-Enter', help: 'run cell in-place'},
31 {key: 'Alt-Enter', help: 'run cell, insert below'},
31 {key: 'Ctrl-m x', help: 'cut cell'},
32 {key: 'Ctrl-m x', help: 'cut cell'},
32 {key: 'Ctrl-m c', help: 'copy cell'},
33 {key: 'Ctrl-m c', help: 'copy cell'},
33 {key: 'Ctrl-m v', help: 'paste cell'},
34 {key: 'Ctrl-m v', help: 'paste cell'},
@@ -253,11 +253,18 b' the notebook can be achieved with minimal mouse intervention. The main'
253 key bindings you need to remember are:
253 key bindings you need to remember are:
254
254
255 * :kbd:`Shift-Enter`: execute the current cell (similar to the Qt console),
255 * :kbd:`Shift-Enter`: execute the current cell (similar to the Qt console),
256 show output (if any) and create a new cell below. Note that in the notebook,
256 show output (if any) and jump to the next cell below. If :kbd:`Shift-Enter`
257 simply using :kbd:`Enter` *never* forces execution, it simply inserts a new
257 was invoked on the last input line, a new code cell will also be created. Note
258 line in the current cell. Therefore, in the notebook you must always use
258 that in the notebook, simply using :kbd:`Enter` *never* forces execution,
259 :kbd:`Shift-Enter` to get execution (or use the mouse and click on the ``Run
259 it simply inserts a new line in the current cell. Therefore, in the notebook
260 Selected`` button).
260 you must always use :kbd:`Shift-Enter` to get execution (or use the mouse and
261 click on the ``Run Selected`` button).
262
263 * :kbd:`Alt-Enter`: this combination is similar to the previous one, with the
264 exception that, if the next cell below is not empty, a new code cell will be
265 added to the notebook, even if the cell execution happens not in the last cell.
266 In this regard, :kbd:`Alt-Enter`: is simply a shortcut for the :kbd:`Shift-Enter`,
267 :kbd:`Ctrl-m a` sequence.
261
268
262 * :kbd:`Ctrl-Enter`: execute the current cell in "terminal mode", where any
269 * :kbd:`Ctrl-Enter`: execute the current cell in "terminal mode", where any
263 output is shown but the cursor stays in the current cell, whose input
270 output is shown but the cursor stays in the current cell, whose input
General Comments 0
You need to be logged in to leave comments. Login now