Skip to content

Commit fd407ad

Browse files
committed
Fixes microsoft#91051: Have Shift+Insert paste from the clipboard by default (like Ctrl+V)
1 parent afcaaa6 commit fd407ad

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

src/vs/editor/contrib/clipboard/clipboard.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ class ExecCommandPasteAction extends ExecCommandAction {
161161
kbExpr: EditorContextKeys.textInputFocus,
162162
primary: KeyMod.CtrlCmd | KeyCode.KEY_V,
163163
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V, secondary: [KeyMod.Shift | KeyCode.Insert] },
164+
linux: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V, secondary: [KeyMod.Shift | KeyCode.Insert] },
164165
weight: KeybindingWeight.EditorContrib
165166
};
166167
// Do not bind paste keybindings in the browser,

src/vs/workbench/contrib/codeEditor/electron-browser/selectionClipboard.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
2020
import { Registry } from 'vs/platform/registry/common/platform';
2121
import { Extensions as WorkbenchExtensions, IWorkbenchContribution, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions';
2222
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
23-
import { KeyMod, KeyCode } from 'vs/base/common/keyCodes';
2423
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
25-
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
26-
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
2724

2825
export class SelectionClipboard extends Disposable implements IEditorContribution {
2926
private static readonly SELECTION_LENGTH_LIMIT = 65536;
@@ -119,15 +116,7 @@ class PasteSelectionClipboardAction extends EditorAction {
119116
id: 'editor.action.selectionClipboardPaste',
120117
label: nls.localize('actions.pasteSelectionClipboard', "Paste Selection Clipboard"),
121118
alias: 'Paste Selection Clipboard',
122-
precondition: EditorContextKeys.writable,
123-
kbOpts: {
124-
kbExpr: ContextKeyExpr.and(
125-
EditorContextKeys.editorTextFocus,
126-
ContextKeyExpr.has('config.editor.selectionClipboard')
127-
),
128-
primary: KeyMod.Shift | KeyCode.Insert,
129-
weight: KeybindingWeight.EditorContrib
130-
}
119+
precondition: EditorContextKeys.writable
131120
});
132121
}
133122

0 commit comments

Comments
 (0)