Wednesday, October 26, 2011

Paste Text in Command Prompt with Ctrl+V and More

Being the tech-savvy crowd you are, we figure you use most or all of the standard Windows hotkeys, such as Ctrl+C for copy. It's also probably safe to assume that you break out the command prompt once in a while. Despite being used almost exclusively by experienced users, the command line is frustratingly incompatible with the most basic key combinations. Plenty of our tips require you to enter text in the command line, some of which can be a real pain to enter manually. To paste text, you either have to right click in the window for a context menu option, or more annoyingly, hit Alt+Space > E > P. Instead of pasting text, the usual Ctrl+V keystroke gives you ^V.

Fortunately, the How-To Geek has found a simple solution. Here's the rundown:
1. Download, install and run AutoHotkey.
2. Download and open the Geek's script.
3. Paste text to your heart's content.

Note that the script doesn't break lines that well. Also, you can hide AutoHotkey in the system tray by adding #NoTrayIcon to the top of the script.

Another way to easily paste text in the Command Prompt
While looking into this topic we also recalled using a mouse right-click on the Command Prompt window to paste clipboard content. As it turns out, you have to enable QuickEdit mode in the CMD which is left disabled by default.
To enable QuickEdit mode:
1. Right-click the Command Prompt's title bar and go to Properties.
2. Under Edit Options, select QuickEdit Mode.
3. Paste text using the mouse right-click button.

This will also let you select text using the mouse and copy it to the clipboard from the Command Prompt by hitting Enter or right-clicking.

Windows 7 will save your QuickEdit mode preference, however if you are using an older OS version and want this to be the default behavior for the Command Prompt, use the Registry Editor (regedit.exe from Run), go to HKEY_CURRENT_USER \ Console and set the QuickEdit key's value data to 1. That should do the trick, permanently.
If you're unfamiliar with Windows' hotkeys, or more specifically Windows 7's new hotkeys, be sure to check out this list for useful shortcuts. A few examples: Win+Space shows the desktop, and Shift+Click on a taskbar icon will open a new program instance.