axil's blog
  • Home
  • Categories
  • Tags
  • Archives

Enabling "Ctrl-V" in Windows console using Autohotkey

Follow those three steps and Ctrl-V will work in cmd.exe seamlessly, even without restarting an already open console.

  1. Install Autohotkey

  2. Create a file named "anything.ahk" with the following contents:

    #IfWinActive ahk_class ConsoleWindowClass
    
    #EscapeChar \
    
    ^V::
    StringReplace clipboard2, clipboard, \r\n, \n, All
    SendInput {Raw}%clipboard2%
    return
    
    #IfWinActive
    
  3. run it

You can disable it:

  • using the tray icon, or (if you don't like the tray icon),
  • add '#NoTrayIcon' to the top of the script and then disable by killing 'AutoHotkey.exe' process in the Task manager

Apply at startup using Start->Programs->Startup

PS Microsoft suddenly added the functionality in Windows 10.


Sources:

  1. http://stackoverflow.com/questions/131955/keyboard-shortcut-to-paste-clipboard-content-into-command-prompt-window-win-xp
  2. http://www.howtogeek.com/howto/25590/how-to-enable-ctrlv-for-pasting-in-the-windows-command-prompt/
  • « Fix Alt-Tab in Labview
  • Efficient Table Editing in Microsoft Word »
Comments
comments powered by Disqus

Published

Jul 31, 2015

Last Updated

2020-07-10 17:56:42.782013+07:00

Category

software

Tags

  • cmd.exe 2
  • paste 1
  • tips 5
  • Powered by Pelican. Theme: Elegant by Talha Mansoor