vscode-powershell: VS Code Keyboard Shortcut for "Paste" Command Not Used in PowerShell Terminal Window

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

When I press CTRL+V in the “PowerShell Extension” Terminal, the text in the Windows Clipboard is not pasted. Instead, nothing happens.

The VS Code Keyboard Shortcuts window shows that the Paste command and Terminal: Paste into Active Terminal command are mapped to CTRL+V, which is what I want because I remember doing something to the Terminal to make it use CTRL+V.

However, there is an entry at the bottom that kicks in when the terminalShellType is “pwsh”. I assume that “pwsh” refers to the “PowerShell Extension” terminal although “pwsh” does not appear in the Terminal window.

PowerShell Version

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.6
PSEdition                      Core
GitCommitId                    7.2.6
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

> code --version
1.72.2
d045a5eda657f4d7b676dedbfa7aab8207f8a075
x64

Extension Version

> code --list-extensions --show-versions | Select-String powershell

ms-vscode.powershell@2022.8.5

Steps to Reproduce

  1. Start VS Code with the PowerShell Extension installed and the Terminal’s Paste command mapped to CTRL+V.
  2. Copy a word from a web page (e.g. “Steps”).
  3. Click in the Terminal (PowerShell Extension).
  4. Press CTRL+V

Visuals

VS Code Keyboard Shortcuts Window

Logs

After following the instructions to set the log level to Diagnostic, I reproduced the problem and closed VS Code. Then, when I looked at C:\Users\zchoy\.vscode\extensions\ms-vscode.powershell-2022.8.5, I could not find a folder named logs.

The Settings window did not have a reference to anything called a “settings file”. I also tried typing “settings file” into the textbox that appears in VS Code after pressing CTRL+P. VS Code said “No matching results”.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

For now, the solution is to remove the user-specific custom keybinding entries in keybindings.json. In the future, perhaps the VS Code team will indicate that the conflict exists in the user interface.

This issue was closed automatically as repro info was indicated as needed, but there has been no activity in over a week. Please feel free to reopen with any available information!