Skip to content

Commit 35c5bb2

Browse files
authored
Merge pull request #743 from mbektas/fix-ctrl-w-issue-on-mac
fix Ctrl + W handling on macOS
2 parents 3032d12 + 5eb87e6 commit 35c5bb2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/labview/labview.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ export class LabView implements IDisposable {
8585
this._view.webContents.on('before-input-event', async (event, input) => {
8686
if (
8787
input.code === 'KeyW' &&
88-
((input.meta && process.platform === 'darwin') || input.control)
88+
((input.meta && process.platform === 'darwin') ||
89+
(input.control && process.platform !== 'darwin'))
8990
) {
9091
let skipClose = false;
9192

@@ -112,6 +113,7 @@ export class LabView implements IDisposable {
112113

113114
skipClose = choice === 1;
114115
} else {
116+
// CtrlWBehavior.DoNotClose
115117
skipClose = true;
116118
}
117119

0 commit comments

Comments
 (0)