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

Conversation

Grommers00
Copy link
Contributor

@Grommers00 Grommers00 commented Nov 11, 2019

Added functionality to the "secondary:" to include CNTL-SHIFT+C and CNTL-SHIFT+V so both are capable of being used. You can test this out in the terminal to make sure they are functional. I checked keyboard mapping and they appear there as well.

This PR fixes #84080

@Tyriar Tyriar self-assigned this Nov 11, 2019
@Grommers00
Copy link
Contributor Author

Will look into this! Thanks for the feedback!

@Grommers00
Copy link
Contributor Author

Hi @Tyriar - not sure if I'm doing something wrong.
if (BrowserFeatures.clipboard.readText) { actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(TerminalPasteAction, TerminalPasteAction.ID, TerminalPasteAction.LABEL, { mac: { 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); },

But I assume this is what I'm trying to add. When I load "yarn watch"
and run vscode from ".\scripts\code.bat"

The loaded visual studio code doesn't seem to reflect any of my changes...is this because I'm using a windows machine and running through command prompt as per "Building and debugging via the Windows subsystem for Linux (WSL) is currently not supported."

Sorry to bug you! Thanks for all your help!

@Tyriar
Copy link
Member

Tyriar commented Nov 12, 2019

@Grommers00 the problem is probably because there is no longer a primary one, try removing mac and just making that the "primary" one:

primary: ...,
win: { primary: ..., secondary: ... },
linux: { primary: ... }

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.

Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

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

Thanks, looks great!

@Tyriar Tyriar added this to the November 2019 milestone Nov 17, 2019
@Tyriar Tyriar merged commit 720d085 into microsoft:master Nov 17, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Add CTRL+SHIFT+* Support in Terminal
3 participants