Skip to content

Commit

Permalink
[keybinding] Make "⌘," the default keybinding to "Open Preferences" o…
Browse files Browse the repository at this point in the history
…n Mac OS (except in Firefox)

Signed-off-by: Jan Keromnes <jan.keromnes@typefox.io>
  • Loading branch information
jankeromnes committed Nov 25, 2019
1 parent 145f913 commit 035b20b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- [core] Switched the frontend application's shutdown hook from `window.unload` to `window.beforeunload`. [#6530](https://github.com/eclipse-theia/theia/issues/6530)
- [core] label providers can now notify that element labels and icons may have changed and should be refreshed [#5884](https://github.com/theia-ide/theia/pull/5884)
- [core] added <kbd>cmd</kbd> + <kbd>,</kbd> as default keybinding for 'Open Preferences' on Mac to align with VS Code [#6620](https://github.com/eclipse-theia/theia/pull/6620)
- [scm] added handling when opening diff-editors to respect preference `workbench.list.openMode` [#6481](https://github.com/eclipse-theia/theia/pull/6481)

Breaking changes:
Expand Down
8 changes: 8 additions & 0 deletions packages/preferences/src/browser/preferences-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import { FileSystem } from '@theia/filesystem/lib/common';
import { UserStorageService } from '@theia/userstorage/lib/browser';
import { PreferencesContainer } from './preferences-tree-widget';
import { EditorManager } from '@theia/editor/lib/browser';
import { isFirefox } from '@theia/core/lib/browser';
import { isOSX } from '@theia/core/lib/common/os';

@injectable()
export class PreferencesContribution extends AbstractViewContribution<PreferencesContainer> {
Expand Down Expand Up @@ -61,6 +63,12 @@ export class PreferencesContribution extends AbstractViewContribution<Preference
}

registerKeybindings(keybindings: KeybindingRegistry): void {
if (isOSX && !isFirefox) {
keybindings.registerKeybinding({
command: CommonCommands.OPEN_PREFERENCES.id,
keybinding: 'cmd+,'
});
}
keybindings.registerKeybinding({
command: CommonCommands.OPEN_PREFERENCES.id,
keybinding: 'ctrl+,'
Expand Down

0 comments on commit 035b20b

Please sign in to comment.