Addresses #401, Add keyboard shortcuts
Default extensions.zotero.keys.overrideGlobal to off
This commit is contained in:
parent
8738662dc6
commit
f35f9f4827
|
@ -210,6 +210,9 @@ var ZoteroPane = new function()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Trigger actions based on keyboard shortcuts
|
||||||
|
*/
|
||||||
function handleKeyPress(event) {
|
function handleKeyPress(event) {
|
||||||
// Ignore keystrokes if Zotero pane is closed
|
// Ignore keystrokes if Zotero pane is closed
|
||||||
if (document.getElementById('zotero-pane').getAttribute('hidden') == 'true') {
|
if (document.getElementById('zotero-pane').getAttribute('hidden') == 'true') {
|
||||||
|
|
|
@ -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() {
|
Zotero.Keys = new function() {
|
||||||
this.init = init;
|
this.init = init;
|
||||||
this.windowInit = windowInit;
|
this.windowInit = windowInit;
|
||||||
|
@ -663,6 +669,9 @@ Zotero.Keys = new function() {
|
||||||
_keys = {};
|
_keys = {};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Called by Zotero.init()
|
||||||
|
*/
|
||||||
function init() {
|
function init() {
|
||||||
// Get the key=>command mappings from the prefs
|
// Get the key=>command mappings from the prefs
|
||||||
for each (var action in _actions) {
|
for each (var action in _actions) {
|
||||||
|
@ -671,6 +680,9 @@ Zotero.Keys = new function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Called by ZoteroPane.onLoad()
|
||||||
|
*/
|
||||||
function windowInit(document) {
|
function windowInit(document) {
|
||||||
var useShift = Zotero.isMac;
|
var useShift = Zotero.isMac;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ pref("extensions.zotero.lastCreatorFieldMode",0);
|
||||||
pref("extensions.zotero.lastRenameAssociatedFile", false);
|
pref("extensions.zotero.lastRenameAssociatedFile", false);
|
||||||
|
|
||||||
// Keyboard shortcuts
|
// Keyboard shortcuts
|
||||||
pref("extensions.zotero.keys.overrideGlobal", true);
|
pref("extensions.zotero.keys.overrideGlobal", false);
|
||||||
pref("extensions.zotero.keys.openZotero", 'Z');
|
pref("extensions.zotero.keys.openZotero", 'Z');
|
||||||
pref("extensions.zotero.keys.toggleFullscreen", 'F');
|
pref("extensions.zotero.keys.toggleFullscreen", 'F');
|
||||||
pref("extensions.zotero.keys.library", 'L');
|
pref("extensions.zotero.keys.library", 'L');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user