Skip to content

Commit

Permalink
Merge pull request jupyterlab#743 from mbektas/fix-ctrl-w-issue-on-mac
Browse files Browse the repository at this point in the history
fix Ctrl + W handling on macOS
  • Loading branch information
mbektas authored Jan 5, 2024
2 parents 3032d12 + 5eb87e6 commit 35c5bb2
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 35c5bb2

Please sign in to comment.