diff --git a/app/scripts/comp/app/shortcuts.js b/app/scripts/comp/app/shortcuts.js
index 50e76f6e..3368de2b 100644
--- a/app/scripts/comp/app/shortcuts.js
+++ b/app/scripts/comp/app/shortcuts.js
@@ -24,7 +24,8 @@ const globalShortcuts = {
copyUser: { mac: 'Ctrl+Alt+B', all: 'Shift+Alt+B' },
copyUrl: { mac: 'Ctrl+Alt+U', all: 'Shift+Alt+U' },
copyOtp: {},
- autoType: { mac: 'Ctrl+Alt+T', all: 'Shift+Alt+T' }
+ autoType: { mac: 'Ctrl+Alt+T', all: 'Shift+Alt+T' },
+ restoreApp: {}
};
const Shortcuts = {
diff --git a/app/scripts/views/settings/settings-shortcuts-view.js b/app/scripts/views/settings/settings-shortcuts-view.js
index b48639bd..fa244811 100644
--- a/app/scripts/views/settings/settings-shortcuts-view.js
+++ b/app/scripts/views/settings/settings-shortcuts-view.js
@@ -43,7 +43,8 @@ class SettingsShortcutsView extends View {
copyPassword: Shortcuts.globalShortcutText('copyPassword', true),
copyUser: Shortcuts.globalShortcutText('copyUser', true),
copyUrl: Shortcuts.globalShortcutText('copyUrl', true),
- copyOtp: Shortcuts.globalShortcutText('copyOtp', true)
+ copyOtp: Shortcuts.globalShortcutText('copyOtp', true),
+ restoreApp: Shortcuts.globalShortcutText('restoreApp', true)
}
: undefined
});
diff --git a/app/templates/settings/settings-shortcuts.hbs b/app/templates/settings/settings-shortcuts.hbs
index 655afe6a..d415f749 100644
--- a/app/templates/settings/settings-shortcuts.hbs
+++ b/app/templates/settings/settings-shortcuts.hbs
@@ -30,5 +30,7 @@
data-shortcut="copyUrl">{{{globalShortcuts.copyUrl}}} {{res 'setShCopyUrlGlobal'}}
{{res 'setShCopyOtpGlobal'}}
+ {{#res 'menuRestoreApp'}}KeeWeb{{/res}}
{{/if}}
diff --git a/desktop/app.js b/desktop/app.js
index 5ecb0bb7..4002b186 100644
--- a/desktop/app.js
+++ b/desktop/app.js
@@ -402,17 +402,22 @@ function setGlobalShortcuts(appSettings) {
CopyPassword: { shortcut: defaultShortcutModifiers + 'C', event: 'copy-password' },
CopyUser: { shortcut: defaultShortcutModifiers + 'B', event: 'copy-user' },
CopyUrl: { shortcut: defaultShortcutModifiers + 'U', event: 'copy-url' },
- CopyOtp: { event: 'copy-otp' }
+ CopyOtp: { event: 'copy-otp' },
+ RestoreApp: { action: restoreMainWindow }
};
electron.globalShortcut.unregisterAll();
for (const [key, shortcutDef] of Object.entries(defaultShortcuts)) {
const fromSettings = appSettings[`globalShortcut${key}`];
const shortcut = fromSettings || shortcutDef.shortcut;
- const eventName = shortcutDef.event;
if (shortcut) {
try {
electron.globalShortcut.register(shortcut, () => {
- emitRemoteEvent(eventName);
+ if (shortcutDef.event) {
+ emitRemoteEvent(shortcutDef.event);
+ }
+ if (shortcutDef.action) {
+ shortcutDef.action();
+ }
});
} catch (e) {}
}
diff --git a/release-notes.md b/release-notes.md
index 1a41cf2b..5d4bba78 100644
--- a/release-notes.md
+++ b/release-notes.md
@@ -4,6 +4,7 @@ Release notes
`-` #1022: fuzzy search
`+` #1108: setting for running in an iframe
`+` #963: keyboard shortcut to copy OTP in background
+`+` #565: global shortcut to open KeeWeb
`-` fix #1273: untranslated menu items
##### v1.11.6 (2019-10-04)