Skip to content

Commit

Permalink
eclipse-theia#729: Added keybinding to delete files with cmd+backspace
Browse files Browse the repository at this point in the history
Signed-off-by: Miro Spönemann <[email protected]>
  • Loading branch information
spoenemann committed May 3, 2018
1 parent 421041c commit 0ce7265
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/navigator/src/browser/navigator-contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { injectable, inject, postConstruct } from "inversify";
import { AbstractViewContribution } from '@theia/core/lib/browser/shell/view-contribution';
import { CommandRegistry, MenuModelRegistry, MenuPath } from "@theia/core/lib/common";
import { CommandRegistry, MenuModelRegistry, MenuPath, isOSX } from "@theia/core/lib/common";
import { Navigatable, SelectableTreeNode, Widget, KeybindingRegistry, CommonCommands, OpenerService } from "@theia/core/lib/browser";
import { SHELL_TABBAR_CONTEXT_MENU } from "@theia/core/lib/browser";
import { WorkspaceCommands } from '@theia/workspace/lib/browser/workspace-commands';
Expand Down Expand Up @@ -129,6 +129,13 @@ export class FileNavigatorContribution extends AbstractViewContribution<FileNavi
keybinding: "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

0 comments on commit 0ce7265

Please sign in to comment.