re #108349. do not bind keybindings cmd+v in terminal on web.

This commit is contained in:
rebornix
2020-10-14 10:51:15 -07:00
parent 40b805be48
commit 076245b1ce

View File

@@ -145,11 +145,11 @@ function registerSendSequenceKeybinding(text: string, rule: { when?: ContextKeyE
const CTRL_LETTER_OFFSET = 64;
if (BrowserFeatures.clipboard.readText) {
actionRegistry.registerWorkbenchAction(SyncActionDescriptor.from(TerminalPasteAction, {
actionRegistry.registerWorkbenchAction(SyncActionDescriptor.from(TerminalPasteAction, platform.isNative ? {
primary: KeyMod.CtrlCmd | KeyCode.KEY_V,
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V, secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_V] },
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_V }
}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Paste into Active Terminal', category, KEYBINDING_CONTEXT_TERMINAL_PROCESS_SUPPORTED);
} : undefined, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Paste into Active Terminal', category, KEYBINDING_CONTEXT_TERMINAL_PROCESS_SUPPORTED);
// An extra Windows-only ctrl+v keybinding is used for pwsh that sends ctrl+v directly to the
// shell, this gets handled by PSReadLine which properly handles multi-line pastes. This is
// disabled in accessibility mode as PowerShell does not run PSReadLine when it detects a screen