From 7f5e7f4e6d9875a40db343e9fe460da9463fedca Mon Sep 17 00:00:00 2001 From: Paul Ivanov Date: Fri, 11 Oct 2013 10:07:58 -0700 Subject: [PATCH] fix (CTRL-M -) shortcut for splitting cell in FF fun-fact: Chromium uses a different keycode for hyphen/minus than does Opera and Firefox. --- IPython/html/static/notebook/js/notebook.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/IPython/html/static/notebook/js/notebook.js b/IPython/html/static/notebook/js/notebook.js index 711120932..2392690c9 100644 --- a/IPython/html/static/notebook/js/notebook.js +++ b/IPython/html/static/notebook/js/notebook.js @@ -317,7 +317,9 @@ var IPython = (function (IPython) { that.undelete(); that.control_key_active = false; return false; - } else if (event.which === 189 && that.control_key_active) { + } else if ((event.which === 189 || event.which === 173) && + that.control_key_active) { + // how fun! '-' is 189 in Chrome, but 173 in FF and Opera // Split cell = - that.split_cell(); that.control_key_active = false;