From 5830139d235c2d477ffd29eae715ad8e89f44838 Mon Sep 17 00:00:00 2001 From: Brian Lange Date: Sat, 20 Feb 2016 11:55:00 -0600 Subject: [PATCH 1/4] Widen kbd shortcuts so that long shortcuts don't break over 2 lines --- notebook/static/notebook/less/quickhelp.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/static/notebook/less/quickhelp.less b/notebook/static/notebook/less/quickhelp.less index 7fea6e7ee..310185cbd 100644 --- a/notebook/static/notebook/less/quickhelp.less +++ b/notebook/static/notebook/less/quickhelp.less @@ -4,7 +4,7 @@ } .shortcut_key { display: inline-block; - width: 20ex; + width: 21ex; text-align: right; font-family: @font-family-monospace; } From d840f72b002c19c051113342d121229fc27e8d07 Mon Sep 17 00:00:00 2001 From: Brian Lange Date: Sat, 20 Feb 2016 12:03:55 -0600 Subject: [PATCH 2/4] Remove duplicate listing for split-cell-at-cursor --- notebook/static/notebook/js/keyboardmanager.js | 1 - 1 file changed, 1 deletion(-) diff --git a/notebook/static/notebook/js/keyboardmanager.js b/notebook/static/notebook/js/keyboardmanager.js index 21138b4ee..37d8e0b06 100644 --- a/notebook/static/notebook/js/keyboardmanager.js +++ b/notebook/static/notebook/js/keyboardmanager.js @@ -79,7 +79,6 @@ define([ 'up' : 'jupyter-notebook:move-cursor-up', 'down' : 'jupyter-notebook:move-cursor-down', 'ctrl-shift--' : 'jupyter-notebook:split-cell-at-cursor', - 'ctrl-shift-subtract' : 'jupyter-notebook:split-cell-at-cursor', }; }; From 7fa84b2fdba189f9978c55335b95a8abdf9f2b82 Mon Sep 17 00:00:00 2001 From: Brian Lange Date: Sat, 20 Feb 2016 12:04:27 -0600 Subject: [PATCH 3/4] Map '-' in non-OSX to text 'Minus' --- notebook/static/notebook/js/quickhelp.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notebook/static/notebook/js/quickhelp.js b/notebook/static/notebook/js/quickhelp.js index 1e0b26c03..744aae64a 100644 --- a/notebook/static/notebook/js/quickhelp.js +++ b/notebook/static/notebook/js/quickhelp.js @@ -113,6 +113,7 @@ define([ 'end':'End', 'space':'Space', 'backspace':'Backspace', + '-':'Minus' }; var humanize_map; @@ -123,7 +124,7 @@ define([ humanize_map = default_humanize_map; } - var special_case = { pageup: "PageUp", pagedown: "Page Down", 'minus': '-' }; + var special_case = { pageup: "PageUp", pagedown: "Page Down" }; function humanize_key(key){ if (key.length === 1){ From a1acd448ed064f231c6be3ccae21806b50dfa988 Mon Sep 17 00:00:00 2001 From: Brian Lange Date: Sat, 20 Feb 2016 14:35:52 -0600 Subject: [PATCH 4/4] Replace 'subtract' with '-' in existing tests --- notebook/tests/notebook/dualmode_merge.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/notebook/tests/notebook/dualmode_merge.js b/notebook/tests/notebook/dualmode_merge.js index e3751951a..0cd15aa3c 100644 --- a/notebook/tests/notebook/dualmode_merge.js +++ b/notebook/tests/notebook/dualmode_merge.js @@ -41,7 +41,7 @@ casper.notebook_test(function () { this.set_cell_text(0, 'abcd'); this.set_cell_editor_cursor(0, 0, 2); this.test.assertEquals(this.get_cell_text(0), 'abcd', 'Verify that cell 0 has the new contents.'); - this.trigger_keydown('ctrl-shift-subtract'); // Split + this.trigger_keydown('ctrl-shift--'); // Split this.test.assertEquals(this.get_cell_text(0), 'ab', 'split; Verify that cell 0 has the first half.'); this.test.assertEquals(this.get_cell_text(1), 'cd', 'split; Verify that cell 1 has the second half.'); this.validate_notebook_state('split', 'edit', 1); @@ -125,12 +125,12 @@ casper.notebook_test(function () { this.select_cell(1); this.trigger_keydown('enter'); this.set_cell_editor_cursor(1, 0, 2); - this.trigger_keydown('ctrl-shift-subtract'); // Split + this.trigger_keydown('ctrl-shift--'); // Split this.test.assertEquals(this.get_cells_length(), N, 'Split cell 1: There are still '+N+' cells'); this.test.assertEquals(this.get_cell_text(0), a, 'Split cell 1: Cell 0 is unchanged'); this.test.assertEquals(this.get_cell_text(1), b, 'Split cell 1: Cell 1 is unchanged'); this.test.assertEquals(this.get_cell_text(2), c, 'Split cell 1: Cell 2 is unchanged'); - this.validate_notebook_state('ctrl-shift-subtract', 'edit', 1); + this.validate_notebook_state('ctrl-shift--', 'edit', 1); }); // Try to merge cell 1 down, should fail, as 1 is locked