My current technique is to right-click in the command prompt and then click paste. This bugs me - is there a better way?
6 Answers
This was solved on Server Fault:
I personally use a little AutoHotkey script to remap certain keyboard functions, for the console window (CMD) I use:>
; Redefine only when the active window is a console window #IfWinActive ahk_class ConsoleWindowClass>; Close Command Window with Ctrl+w $^w:: WinGetTitle sTitle If (InStr(sTitle, "-")=0) { Send EXIT{Enter} } else { Send ^w }
return
; Ctrl+up / Down to scroll command window back and forward ^Up:: Send {WheelUp} return
^Down:: Send {WheelDown} return
; Paste in command window ^V:: ; Spanish menu (Editar->Pegar, I suppose English version is the same, Edit->Paste) Send !{Space}ep return
#IfWinActive
If you're wanting to pipe lots of clipboard text into another program, you can use PowerShell's Get-Clipboard nowadays.
powershell Get-Clipboard | more
(To copy text, you can pipe it into clip, which is supported directly in cmd.)
- 7,889
Control and V, like the rest of the OS :P
#IfWinActive, ahk_class ConsoleWindowClass
^v:: Send !{Space}ep
#IfWinActive
(Yep, that's just automating the previous answers, but automating them it is. Autohotkey! :))
- 23,483

