Skip to content
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

fix #84080 added cntl-shift-c and cntl-shift-v to terminal #84438

Merged
merged 4 commits into from
Nov 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -552,20 +552,21 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FindPrevious, Fi
mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G, secondary: [KeyMod.Shift | KeyCode.F3, KeyCode.Enter] },
}, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED), 'Terminal: Find previous', category);

// Commands miht be affected by Web restrictons
// Commands might be affected by Web restrictons
if (BrowserFeatures.clipboard.writeText) {
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(CopyTerminalSelectionAction, CopyTerminalSelectionAction.ID, CopyTerminalSelectionAction.LABEL, {
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
win: { primary: KeyCode.Ctrl | KeyCode.KEY_C, secondary: [KeyCode.Ctrl | KeyCode.Shift | KeyCode.KEY_C] },
Copy link

@tracker1 tracker1 Nov 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this work?

primary: KeyCode.CtrlCmd | KeyCode.Shift | KeyCode.KEY_C,
win: { secondary: KeyCode.Ctrl | KeyCode.KEY_C },
mac: { secondary: KeyCode.Cmd | KeyCode.KEY_C }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think that should work as well.

Copy link
Member

@Tyriar Tyriar Nov 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that works but if it did we wouldn't want cmd+shift+c to be bound on mac. I think they all need a primary.

linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_C }
}, ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, KEYBINDING_CONTEXT_TERMINAL_FOCUS)), 'Terminal: Copy Selection', category);
}
if (BrowserFeatures.clipboard.readText) {
actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(TerminalPasteAction, TerminalPasteAction.ID, TerminalPasteAction.LABEL, {
primary: KeyMod.CtrlCmd | KeyCode.KEY_V,
win: { primary: KeyCode.Ctrl | KeyCode.KEY_V, secondary: [KeyCode.Ctrl | KeyCode.Shift | KeyCode.KEY_V] },
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_V }
}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Paste into Active Terminal', category);
}

(new SendSequenceTerminalCommand({
id: SendSequenceTerminalCommand.ID,
precondition: undefined,
Expand Down