1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Revert "Desktop: Add global shortcut to show/hide Joplin (#2653)"

This reverts commit 0863f0d564.
This commit is contained in:
Helmut K. C. Tessarek 2020-04-15 05:50:26 -04:00
parent 900b0f3eb2
commit aa738cc086
No known key found for this signature in database
GPG Key ID: BE0985349D44DD00
2 changed files with 1 additions and 23 deletions

View File

@ -1,4 +1,4 @@
const { BrowserWindow, Tray, screen, globalShortcut } = require('electron');
const { BrowserWindow, Tray, screen } = require('electron');
const { shim } = require('lib/shim');
const url = require('url');
const path = require('path');
@ -277,15 +277,6 @@ class ElectronAppWrapper {
return false;
}
toggleWindowVisilibity() {
if (this.win_.isVisible()) {
this.win_.hide();
} else {
this.win_.setVisibleOnAllWorkspaces(true);
this.win_.show();
}
}
async start() {
// Since we are doing other async things before creating the window, we might miss
// the "ready" event. So we use the function below to make sure that the app is ready.
@ -296,17 +287,8 @@ class ElectronAppWrapper {
this.createWindow();
const registerGlobalShortcut = globalShortcut.register('CommandOrControl+Alt+J', () => {
this.toggleWindowVisilibity();
});
if (!registerGlobalShortcut) {
console.warn('Could not register global shortcut');
}
this.electronApp_.on('before-quit', () => {
this.willQuitApp_ = true;
globalShortcut.unregisterAll();
});
this.electronApp_.on('window-all-closed', () => {

View File

@ -303,10 +303,6 @@ Notes are sorted by "relevance". Currently it means the notes that contain the r
In the desktop application, press <kbd>Ctrl+G</kbd> or <kbd>Cmd+G</kbd> and type a note title or part of its content to jump to it. Or type <kbd>#</kbd> followed by a tag name, or <kbd>@</kbd> followed by a notebook name.
# Global shortcut
In the desktop application, press `Cmd+Opt+J` (macOS) or `Ctrl+Alt+J` (Linux, Windows) to show or hide Joplin in the current workspace.
# Privacy
Joplin values your privacy and security by giving you complete control over your information and digital footprint.