3.4 Creating custom shortcuts
Last updated
// Note: you should add settings *within* the zoteroRoam_settings object
// that contains your dataRequests -- do not declare it again
// Here we're assigning our alt-p shortcut to the toggleSearchPanel action :
zoteroRoam_settings = {
// Your dataRequests object should be here :
dataRequests: {
apikey: 'XXXXXXXXXXXXXXXX',
dataURI: 'users/1234567/items',
params: 'limit=100'
},
shortcuts: {
'toggleSearchPanel': {'altKey': true, 'p': true}
}
}// Note that multiple shortcuts can be assigned to a given action.
// This is done by providing an Array of shortcut objects.
// For example, we can assign both alt-p and alt-q to toggle the Search Panel :
zoteroRoam_settings = {
// Your dataRequests object should be here :
dataRequests: {
apikey: 'XXXXXXXXXXXXXXXX',
dataURI: 'users/1234567/items',
params: 'limit=100'
},
shortcuts: {
'toggleSearchPanel': [{'altKey': true, 'p': true},
{'altKey': true, 'q': true}]
}
}