converted more keyboard actions

This commit is contained in:
zadam
2020-01-21 22:54:16 +01:00
parent af5c623671
commit c63bb7ce8a
9 changed files with 136 additions and 156 deletions

View File

@@ -12,7 +12,8 @@ const keyboardActionsLoaded = server.get('keyboard-actions').then(actions => {
if (shortcut && !shortcut.startsWith("global:")) { // global shortcuts should be handled in the electron code
const eventName = action.actionName.charAt(0).toLowerCase() + action.actionName.slice(1);
utils.bindGlobalShortcut(shortcut, () => appContext.trigger(eventName));
// empty object param so that destructuring with optional params work
utils.bindGlobalShortcut(shortcut, () => appContext.trigger(eventName, {}));
}
}
}