diff --git a/IPython/html/static/base/js/keyboard.js b/IPython/html/static/base/js/keyboard.js index 080f92b..3ad386f 100644 --- a/IPython/html/static/base/js/keyboard.js +++ b/IPython/html/static/base/js/keyboard.js @@ -88,12 +88,14 @@ IPython.keyboard = (function (IPython) { // 3. Sort '-' separated modifiers into the order alt-ctrl-meta-shift // 4. Normalize keys shortcut = shortcut.toLowerCase().replace('cmd', 'meta'); + shortcut = shortcut.replace('--', '-'); // catch shortcuts using '-' key var values = shortcut.split("-"); if (values.length === 1) { return normalize_key(values[0]); } else { var modifiers = values.slice(0,-1); var key = normalize_key(values[values.length-1]); + key = key || '-'; // '-' will make the key undefined, since we split on it modifiers.sort(); return modifiers.join('-') + '-' + key; } diff --git a/IPython/html/static/notebook/js/quickhelp.js b/IPython/html/static/notebook/js/quickhelp.js index a75238b..f10c2fd 100644 --- a/IPython/html/static/notebook/js/quickhelp.js +++ b/IPython/html/static/notebook/js/quickhelp.js @@ -71,8 +71,9 @@ var IPython = (function (IPython) { return build_div('

Command Mode (press Esc to enable)

', command_shortcuts); }; - var special_case = { pageup: "PageUp", pagedown: "Page Down" }; + var special_case = { pageup: "PageUp", pagedown: "Page Down", '': '-' }; var prettify = function (s) { + s = s.replace('--', '-'); // catch shortcuts using '-' key var keys = s.split('-'); var k, i; for (i in keys) {