diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index a602b912e..121dc39a1 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -210,6 +210,9 @@ var ZoteroPane = new function() } + /* + * Trigger actions based on keyboard shortcuts + */ function handleKeyPress(event) { // Ignore keystrokes if Zotero pane is closed if (document.getElementById('zotero-pane').getAttribute('hidden') == 'true') { diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 1cdb46cd6..a6977de4e 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -653,6 +653,12 @@ Zotero.Prefs = new function(){ } +/* + * Handles keyboard shortcut initialization from preferences, optionally + * overriding existing global shortcuts + * + * Actions are configured in ZoteroPane.handleKeyPress() + */ Zotero.Keys = new function() { this.init = init; this.windowInit = windowInit; @@ -663,6 +669,9 @@ Zotero.Keys = new function() { _keys = {}; + /* + * Called by Zotero.init() + */ function init() { // Get the key=>command mappings from the prefs for each (var action in _actions) { @@ -671,6 +680,9 @@ Zotero.Keys = new function() { } + /* + * Called by ZoteroPane.onLoad() + */ function windowInit(document) { var useShift = Zotero.isMac; diff --git a/defaults/preferences/zotero.js b/defaults/preferences/zotero.js index 9de4251c9..d42f9ed0d 100644 --- a/defaults/preferences/zotero.js +++ b/defaults/preferences/zotero.js @@ -21,7 +21,7 @@ pref("extensions.zotero.lastCreatorFieldMode",0); pref("extensions.zotero.lastRenameAssociatedFile", false); // Keyboard shortcuts -pref("extensions.zotero.keys.overrideGlobal", true); +pref("extensions.zotero.keys.overrideGlobal", false); pref("extensions.zotero.keys.openZotero", 'Z'); pref("extensions.zotero.keys.toggleFullscreen", 'F'); pref("extensions.zotero.keys.library", 'L');