Keyboard shortcuts: volume shortcuts should be local

`globalShortcut` will register the shortcut at the OS level, even when
the app is not focused.

Using `localShortcut` would work, but let's put it in the top menu
instead, where all the other shortcuts are.
This commit is contained in:
Feross Aboukhadijeh
2016-03-26 19:57:39 -07:00
parent 0cf89600c0
commit 9ef1d0a605
4 changed files with 64 additions and 27 deletions

View File

@@ -18,8 +18,4 @@ function init () {
// Electron does not support multiple accelerators for a single menu item, so this
// is registered separately here.
localShortcut.register('CmdOrCtrl+Shift+F', menu.toggleFullScreen)
// Control Volume
globalShortcut.register('CmdOrCtrl+Up', () => windows.main.send('dispatch', 'changeVolume', 0.1))
globalShortcut.register('CmdOrCtrl+Down', () => windows.main.send('dispatch', 'changeVolume', -0.1))
}