You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-18 23:07:45 +02:00
Desktop: Add keyboard shortcut editor (#3525)
This commit is contained in:
committed by
GitHub
parent
0998fc0ad7
commit
a8296e2e37
@ -1,4 +1,5 @@
|
||||
const { Logger } = require('lib/logger.js');
|
||||
const KeymapService = require('lib/services/KeymapService').default;
|
||||
|
||||
class PluginManager {
|
||||
constructor() {
|
||||
@ -80,6 +81,8 @@ class PluginManager {
|
||||
|
||||
menuItems() {
|
||||
let output = [];
|
||||
const keymapService = KeymapService.instance();
|
||||
|
||||
for (const name in this.plugins_) {
|
||||
const menuItems = this.plugins_[name].Class.manifest.menuItems;
|
||||
if (!menuItems) continue;
|
||||
@ -91,10 +94,7 @@ class PluginManager {
|
||||
itemName: item.name,
|
||||
});
|
||||
};
|
||||
|
||||
if (item.accelerator instanceof Function) {
|
||||
item.accelerator = item.accelerator();
|
||||
}
|
||||
item.accelerator = keymapService.getAccelerator(name);
|
||||
}
|
||||
|
||||
output = output.concat(menuItems);
|
||||
|
Reference in New Issue
Block a user