Files
webtorrent-desktop/main/shortcuts.js
Feross Aboukhadijeh 7eeda57b57 Add alternate fullscreen shortcut ⌘+Shift+F (fix #26)
Uses https://npmjs.com/package/electron-localshortcut to workaround a
bug in Electron (https://github.com/atom/electron/issues/1334).

We can remove `electron-localshortcut` once that bug is fixed.
2016-03-05 17:25:22 -08:00

14 lines
426 B
JavaScript

module.exports = {
init: init
}
var electron = require('electron')
var localShortcut = require('electron-localshortcut')
function init (menu) {
// ⌘+Shift+F is an alternative fullscreen shortcut to the one defined in menu.js.
// Electron does not support multiple accelerators for a single menu item, so this
// is registered separately here.
localShortcut.register('CmdOrCtrl+Shift+F', menu.toggleFullScreen)
}