Skip to content

Commit

Permalink
fix Ctrl + W handling on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mbektas committed Dec 27, 2023
1 parent 3032d12 commit 5eb87e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/labview/labview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ export class LabView implements IDisposable {
this._view.webContents.on('before-input-event', async (event, input) => {
if (
input.code === 'KeyW' &&
((input.meta && process.platform === 'darwin') || input.control)
((input.meta && process.platform === 'darwin') ||
(input.control && process.platform !== 'darwin'))
) {
let skipClose = false;

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

skipClose = choice === 1;
} else {
// CtrlWBehavior.DoNotClose
skipClose = true;
}

Expand Down

0 comments on commit 5eb87e6

Please sign in to comment.