Is there a keyboard shortcut to paste in the Windows command prompt (or at least powershell)?
I'm aware that you can right click, but it would be handy if it was possible without touching the mouse.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityIs there a keyboard shortcut to paste in the Windows command prompt (or at least powershell)?
I'm aware that you can right click, but it would be handy if it was possible without touching the mouse.
Unfortunately Microsoft resists to add SHIFT+INSERT
((
For regedit
nuts:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Console]
; 1 - enable improved conhost features.
"ForceV2"=dword:00000001
; Use wrapped text selection.
"LineSelection"=dword:00000001
; Re-wrap text on resize operations.
"LineWrap"=dword:00000001
; Allow close on Alt-F4 hotkey.
"AllowAltF4Close"=dword:00000001
; Enable interpretation of VT control codes.
"VirtualTerminalLevel"=dword:00000001
; 1 - activate "Insert mode", opposite of "Override mode".
"InsertMode"=dword:00000001
; Disable word selection with Shift+ARROW, use Ctrl+M to enter to "Mark Mode".
"ExtendedEditKey"=dword:00000000
; Not really sure what it is. Default is "0".
"ExtendedEditKeyCustom"=dword:00000000
; Allow selection by mouse & copy/paste by mouse right click.
; reg add HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f
"QuickEdit"=dword:00000001
; Enables Ctrl+Shift+C/V style copy/paste.
; https://github.com/microsoft/terminal/issues/397
"InterceptCopyPaste"=dword:00000001
; Whether to replace characters on paste (e.g. Word “smart quotes” are replaced with regular
; quotes). I want for paste to insert text literary, so disabled the "feature" (by the value "0")!
"FilterOnPaste"=dword:00000000
; Do not strip leading zeros when copying on selection (like "001" => "1").
"TrimLeadingZeros"=dword:00000000
; Disable Ctrl+C/V/A, use only Ctrl+Shift+C/V from "InterceptCopyPaste".
"CtrlKeyShortcutsDisabled"=dword:00000001
Press Alt+Space followed by E and finally P
This will open the alt Menu > Edit > Paste
Checkout this Stackoverflow article. They provide an AutoHotKey script. If you aren't familiar with AutoHotKey you should be. It is a free application that allows you to automate a ton of things on Windows. I use it for a number of tasks. You can even compile the scripts and then just run the executable. Great for distribution to less tech savvy folks or for running off a thumb drive for portability.
They also mention this:
ALT+SPACE+E+K <-- for copy
ALT+SPACE+E+P <-- for paste
You can use PowerShell inside ConEmu, which lets you use ctrl-v.
Ctrl-v also works in the PowerShell ISE.
Closed on stackoverflow, but AutoHotKey works perfectly:
; Paste into CMD window using CTRL+SHIFT+INSERT
^+Insert::
WinGetClass, sClass, A
If (sClass = "ConsoleWindowClass")
{
send {alt down}{space}{alt up}ep
}
return