Added '-' as a shortcut for splitting cells.

This commit is contained in:
damianavila 2013-07-09 17:55:13 -03:00
parent 73e88b6677
commit 7aab2ec291
2 changed files with 4 additions and 16 deletions

View File

@ -319,21 +319,11 @@ var IPython = (function (IPython) {
that.undelete();
that.control_key_active = false;
return false;
} else if (event.which === 55 && that.control_key_active) {
// Split cell = w
} else if (event.which === 189 && that.control_key_active) {
// Split cell = -
that.split_cell();
that.control_key_active = false;
return false;
} else if (event.which === 56 && that.control_key_active) {
// Merge cell above = e
that.merge_cell_above();
that.control_key_active = false;
return false;
} else if (event.which === 57 && that.control_key_active) {
// Merge cell below = r
that.merge_cell_below();
that.control_key_active = false;
return false;
return false;
} else if (that.control_key_active) {
that.control_key_active = false;
return true;

View File

@ -32,6 +32,7 @@ var IPython = (function (IPython) {
{key: 'Ctrl-m v', help: 'paste cell'},
{key: 'Ctrl-m d', help: 'delete cell'},
{key: 'Ctrl-m z', help: 'undo last cell deletion'},
{key: 'Ctrl-m -', help: 'split cell'},
{key: 'Ctrl-m a', help: 'insert cell above'},
{key: 'Ctrl-m b', help: 'insert cell below'},
{key: 'Ctrl-m o', help: 'toggle output'},
@ -44,9 +45,6 @@ var IPython = (function (IPython) {
{key: 'Ctrl-m m', help: 'markdown cell'},
{key: 'Ctrl-m t', help: 'raw cell'},
{key: 'Ctrl-m 1-6', help: 'heading 1-6 cell'},
{key: 'Ctrl-m 7', help: 'split cell'},
{key: 'Ctrl-m 8', help: 'merge cell above'},
{key: 'Ctrl-m 9', help: 'merge cell below'},
{key: 'Ctrl-m p', help: 'select previous'},
{key: 'Ctrl-m n', help: 'select next'},
{key: 'Ctrl-m i', help: 'interrupt kernel'},