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

[keybinding] wrong keybinding for "Open Preferences" on Mac (Electron): should be Cmd+, not Ctrl+, #6606

Closed
jankeromnes opened this issue Nov 22, 2019 · 5 comments · Fixed by #6620
Assignees
Labels
electron issues related to the electron target keybindings issues related to keybindings

Comments

@jankeromnes
Copy link
Member

On Mac OS (Electron), the keybinding for Settings > Open Preferences is Ctrl + ,.

Instead, it should be Cmd + , because that seems to be the expected keybinding, and it's what VS Code uses for Preferences > Settings.

Notes:

@akosyakov akosyakov added electron issues related to the electron target keybindings issues related to keybindings labels Nov 22, 2019
@svenefftinge
Copy link
Contributor

Could you also take care of the other 'non-native' keybindings, e.g. Cmd + w?
Also I think they should be registered in addition so we don't unnecessarily break electron users that already got familiar with our alternative bindings.

@jankeromnes
Copy link
Member Author

Two excellent ideas, thanks! Will do.

@jankeromnes
Copy link
Member Author

jankeromnes commented Nov 22, 2019

The keybinding is currently hard-coded as Ctrl + ,, regardless of build or OS:

registerKeybindings(keybindings: KeybindingRegistry): void {
keybindings.registerKeybinding({
command: CommonCommands.OPEN_PREFERENCES.id,
keybinding: 'ctrl+,'
});
}

I'll take a look at Windows to see if this actually works (in browser and in Electron).

EDIT: Interestingly, Ctrl + , already works as expected on Windows, in browser and in Electron. So this is really just a Mac OS problem (assuming Ctrl + , works on Linux too).

@paul-marechal
Copy link
Member

paul-marechal commented Nov 22, 2019

Does replacing the keybinding field by 'ctrlcmd+,' do the trick?

@jankeromnes
Copy link
Member Author

jankeromnes commented Nov 25, 2019

Does replacing the keybinding field by 'ctrlcmd+,' do the trick?

@marechal-p This would almost do the trick, except:

  • In Firefox, on Mac, cmd+, is intercepted by the browser (and opens the browser settings instead)
  • Some Mac users may already be used to the non-standard ctrl+, shortcut, so it should probably continue to work (even if it's not the default)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electron issues related to the electron target keybindings issues related to keybindings
Projects
None yet
4 participants