Skip to content

Commit

Permalink
Restore cmd+w to close window on macOS
Browse files Browse the repository at this point in the history
closes #877
  • Loading branch information
GarboMuffin committed Dec 14, 2023
1 parent 499b3f0 commit b4a1d34
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src-main/l10n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
"string": "New Window",
"developer_comment": "macOS menu bar item to open a new editor window"
},
"menu.close-window": {
"string": "Close Window",
"developer_comment": "macOS menu bar item to close the current window"
},
"menu.settings": {
"string": "Settings",
"developer_comment": "macOS menu bar item to open desktop settings window"
Expand Down
7 changes: 7 additions & 0 deletions src-main/menu-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ const rebuildMenuBar = () => {
PackagerWindow.forEditor(window);
}
}
},
{
label: translate('menu.close-window'),
accelerator: 'Cmd+W',
click: (menuItem, browserWindow) => {
browserWindow.close();
}
}
]
},
Expand Down

1 comment on commit b4a1d34

@sfederici
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent. It works exactly as expected

Please sign in to comment.