Skip to content

Commit

Permalink
Fix #17
Browse files Browse the repository at this point in the history
Use local shortcut insted of global
  • Loading branch information
Jakub Synowiec committed Feb 19, 2018
1 parent 94d5387 commit 7ddc24a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { app, ipcMain, shell, globalShortcut } from 'electron';
import { app, ipcMain, shell } from 'electron';
import electronLocalshortcut = require('electron-localshortcut');

import { IAirlyCurrentMeasurement } from './airly';
import { getCAQIMeta } from './caqi';
Expand Down Expand Up @@ -31,9 +32,7 @@ app.on('ready', () => {
},
});

globalShortcut.register('Command+,', () => {
showPreferencesWindow();
});
electronLocalshortcut.register(trayWindowManager.window, 'Cmd+,', showPreferencesWindow);
});

// Quit the app when the window is closed
Expand Down

0 comments on commit 7ddc24a

Please sign in to comment.