-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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] Align 'Open Preferences' and 'Save As' keybindings with VS Code on Mac OS #6620
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not be
else
here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intended: E.g. on Mac OS, in Chrome or Electron, we'll register both
cmd+,
andctrl+,
:cmd+,
is the new default keybinding, whilectrl+,
is there for people who already got used to typingctrl+,
for Preferences on Mac OSSide note: In the
File
>Settings
>Open Preferences
menu entry, only the first keybinding shows up. (I double-checked that both keybindings work as expected, but that only the first is shown in the menu.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: this change will disable the default Chrome binding for opening Chrome preferences on macOS. Was it on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in order to follow VS Code's convention, we'd like to replace the behavior of
cmd+,
in browsers. (This only works in Chrome though -- Firefox will continue to open browser preferences, which is why we set a different default keybinding there).Would you be surprised that hitting
cmd+,
in Theia in Chrome now opens the Theia preferences and no longer the Chrome preferences?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we follow VS Code's convention in electron only and not disable/override the browser bindings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. My understanding was that we try to follow VS Code's convention everywhere, but that in some browsers, it's sometimes impossible to override browser bindings (e.g. it's impossible to override
cmd+,
in Firefox) in which case we fall back on alternative bindings, but I may be wrong.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought, no. My understanding was the following; we mimic the VS Code keymap in electron and leave the rest as is. For instance, why would we ever distinguish between macOS and other platforms when using Gitpod in Chrome.
CC: @svenefftinge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keybindings are part of a user's muscle memory. So we want to meet expectations as much as possible. I.e. the only reason to diverge from the default keybindings from VS Code (resp. keymaps like emacs or vim) is that browsers hinder us from handling certain keybindings.
Since CMD+, works in Chrome it should be used.