Skip to content

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

Merged
Daniel Imms (Tyriar) merged 4 commits into
microsoft:masterfrom
Grommers00:issue-84080
Nov 17, 2019
Merged

fix #84080 added cntl-shift-c and cntl-shift-v to terminal#84438
Daniel Imms (Tyriar) merged 4 commits into
microsoft:masterfrom
Grommers00:issue-84080

Conversation

@Grommers00

@Grommers00 James Inkster (Grommers00) commented Nov 11, 2019

Copy link
Copy Markdown
Contributor
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 Daniel Imms (Tyriar) self-assigned this Nov 11, 2019
Comment thread src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts Outdated
@Grommers00

Copy link
Copy Markdown
Contributor Author

Will look into this! Thanks for the feedback!

@Grommers00

Copy link
Copy Markdown
Contributor Author

Hi Daniel Imms (@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
Copy Markdown
Contributor

James Inkster (@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] },

@tracker1 Michael J. Ryan (tracker1) Nov 15, 2019

Copy link
Copy Markdown

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
Copy Markdown
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.

@Tyriar Daniel Imms (Tyriar) Nov 17, 2019

Copy link
Copy Markdown
Contributor

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.

@Tyriar Daniel Imms (Tyriar) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, looks great!

@Tyriar Daniel Imms (Tyriar) added this to the November 2019 milestone Nov 17, 2019
@Tyriar
Daniel Imms (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