-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add alternate fullscreen shortcut ⌘+Shift+F (fix #26)
Uses https://npmjs.com/package/electron-localshortcut to workaround a bug in Electron (electron/electron#1334). We can remove `electron-localshortcut` once that bug is fixed.
- Loading branch information
Showing
5 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters