Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(menu): open fullscreen with Ctrl+Cmd+F on Mac #2069

Merged
merged 1 commit into from
Jan 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/lib/menu/mac-os/mac-menu-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ class MacMenuBuilder extends MenuBuilder {
}));
}

getWindowSubmenuTemplate() {
const submenuTemplate = super.getWindowSubmenuTemplate();

const fullScreenEntry = submenuTemplate.find(({ label }) => label === 'Fullscreen');

fullScreenEntry.accelerator = 'Ctrl+Cmd+F';
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a macOS-only shortcut?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup. And it's common among MacOS apps: VS Code, Chrome, Firefox, Finder, Preview etc.

Copy link
Contributor

@pinussilvestrus pinussilvestrus Jan 18, 2021

Choose a reason for hiding this comment

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

Can we add it for other platforms, like F11 for Windows? Or do we already have it?

Got it:

label: 'Fullscreen',

Sorry!


return submenuTemplate;
}

build() {
this.appendAppMenu();

Expand Down