Skip to content

Commit d946415

Browse files
committed
COMPASS-3811: Zoom works with CMD/CTRL+=
1 parent aeb1957 commit d946415

File tree

3 files changed

+52
-3
lines changed

3 files changed

+52
-3
lines changed

package-lock.json

Lines changed: 46 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@
339339
"debug": "mongodb-js/debug#v2.2.3",
340340
"debug-menu": "^0.3.0",
341341
"detect-coordinates": "^0.2.0",
342+
"electron-localshortcut": "^3.1.0",
342343
"electron-squirrel-startup": "^1.0.0",
343344
"ensure-error": "^1.0.0",
344345
"font-awesome": "^4.7.0",

src/main/window-manager.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* https://github.com/atom/electron/blob/master/docs/api/browser-window.md
44
*/
55
var electron = require('electron');
6+
var electronLocalShortcut = require('electron-localshortcut');
67
var AppMenu = require('./menu');
78
var BrowserWindow = electron.BrowserWindow;
89

@@ -128,6 +129,10 @@ var createWindow = (module.exports.create = function(opts) {
128129
}
129130
});
130131

132+
electronLocalShortcut.register(_window, 'CmdOrCtrl+=', () => {
133+
ipc.broadcast('window:zoom-in');
134+
});
135+
131136
/**
132137
* TODO (@imlucas) COMPASS-3134 to factor out 2 BrowserWindow's.
133138
*/

0 commit comments

Comments
 (0)