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)
  • Loading branch information
jankeromnes committed Nov 25, 2019
1 parent 145f913 commit 950473d
Showing 1 changed file with 8 additions and 0 deletions.
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 950473d

Please sign in to comment.