Skip to content

Commit

Permalink
[keybinding] Duplicate keybinding for opening the preferences widget …
Browse files Browse the repository at this point in the history
…and deleting file on navigator

Fixes: #8202

Made keybindings not duplicated for opening the preferences widget and deleting file on navigator on MacOS

Signed-off-by: Min-young Yang <didalsdud@gmail.com>
  • Loading branch information
minyoungyang authored and akosyakov committed Aug 3, 2020
1 parent f673eb4 commit f803fc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
9 changes: 1 addition & 8 deletions packages/navigator/src/browser/navigator-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,16 +442,9 @@ export class FileNavigatorContribution extends AbstractViewContribution<FileNavi

registry.registerKeybinding({
command: WorkspaceCommands.FILE_DELETE.id,
keybinding: 'del',
keybinding: isOSX ? 'cmd+backspace' : 'del',
context: NavigatorKeybindingContexts.navigatorActive
});
if (isOSX) {
registry.registerKeybinding({
command: WorkspaceCommands.FILE_DELETE.id,
keybinding: 'cmd+backspace',
context: NavigatorKeybindingContexts.navigatorActive
});
}

registry.registerKeybinding({
command: WorkspaceCommands.FILE_RENAME.id,
Expand Down
9 changes: 1 addition & 8 deletions packages/preferences/src/browser/preferences-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,9 @@ 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+,',
keybinding: (isOSX && !isFirefox) ? 'cmd+,' : 'ctrl+,'
});
}

Expand Down

0 comments on commit f803fc0

Please sign in to comment.