Use “Enter” key to copy data in Windows Terminal

While working at PowerShell , we have the option of copying text by selecting it and pressing Enter key. Later, we can paste the text whenever required by right-clicking anywhere inside the window. Unfortunately Windows Terminal does not allow us to work in a similar manner. When you select any text inside Windows Terminal and press Enter key to copy it, it simply jumps to a new command (carriage return) without actually saving the text to the clipboard. And there is no setting to make it work. So alternate way to make this work is by opening settings.json file for Windows Terminal. File is located in below location.

%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json

Locate below text block in this file and copy it and paste it on the same file.

Once pasted then edit copied text and replace “Keys”: “crtl+c” with “keys”: “enter”. Save the file and restart windows terminal and now you will be able to copy the text by selecting and hitting enter.

This entry was posted in Powershell. Bookmark the permalink.

Leave a Reply

Your email address will not be published.