One of the more irritating problems with the Windows command prompt is that you can’t paste anything into the window using the keyboard easily—it requires using the mouse. Here’s how to fix that problem.

The solution, as with many Windows shortcomings, is to use a quick AutoHotkey script to enable pasting from the keyboard. What it actually does is take the clipboard contents and use the SendInput function to send the keystrokes really quickly to the console window.

But first… here’s another way to do it.

Enabling CTRL + C and CTRL + V in Windows 10

All you have to do to get copy and paste working in Windows 10 is to right-click on the command prompt’s title bar, choose Properties…

And then click “Enable new Ctrl key shortcuts”. You’ll probably have to click the “Enable experimental console features” checkbox first though.

And now you can copy and paste in the command prompt.

The Alternate Built-In Way to Paste from the Keyboard (Windows 10, 8, 7, or Vista)

There is actually a way to paste something using the keyboard, but it’s not terribly convenient to use. What you’ll have to do is use the Alt+Space keyboard combination to bring up the window menu, then hit the E key, and then the P key. This will trigger the menus and paste into the console.

Once you get used to doing it, it really isn’t so bad… but who wants to use a different combination for one application than the rest of Windows?

The AutoHotkey Script Ctrl+V Awesomeness

You’ll need to first make sure that you’ve got AutoHotkey installed, and then create a new AutoHotkey script or add the following to your existing script. We’ve also provided a download in case there are any formatting problems.

What this script does is simply use the SendInput function to send the data into the window, which is a lot faster than any other method.

Note: the script doesn’t paste line breaks very well. If you’ve got a better solution for that, feel free to let us know in the comments and we’ll update the post.

Downloadable AutoHotkey Script

Simply grab the script, save it anywhere, and then double-click on it to start it. You can kill it through the tray icon if you want—if you’d like to hide the tray icon, add #NoTrayIcon to the top of the script.

Lowell Heddings is the founder and Editor-in-Chief of How-To Geek. He spends all his free time making sure this site can bring you fresh geekery on a daily basis, and has been doing so for over eleven years.

Did You Know

OJ Simpson was suggested for the lead role of the Terminator, but James Cameron rejected the idea on the grounds that the audience would be unable to see Simpson as a killer.