diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 01aad431a6..67d6b34d70 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -1788,7 +1788,7 @@ Zotero.Keys = new function() { // Get the key=>command mappings from the prefs for (let cmd of cmds) { - cmd = cmd.substr(5); // strips 'keys.' + cmd = cmd.replace(/^extensions\.zotero\.keys\./, ''); // Remove old pref if (cmd == 'overrideGlobal') { Zotero.Prefs.clear('keys.overrideGlobal'); diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 9abc9e460a..dfad305ca8 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -624,11 +624,8 @@ var ZoteroPane = new function() event.preventDefault(); return; } - - var key = String.fromCharCode(event.which); - if (key) { - var command = Zotero.Keys.getCommand(key); - } + + var command = Zotero.Keys.getCommand(event.key); if (from == 'zotero-collections-tree') { if ((event.keyCode == event.DOM_VK_BACK_SPACE && Zotero.isMac) || @@ -689,11 +686,6 @@ var ZoteroPane = new function() return; } - if (!key) { - Zotero.debug('No key'); - return; - } - if (!command) { return; }