Friday, January 7, 2011

How to Enable Ctrl+V for Pasting in the Windows Command Prompt

           In this post I want to share about “how to make your own hotkeys for a specific task in windows?”         

You’ll need to first make sure that you’ve got AutoHotkey installed. Now run that program, it will prompt you to open default script click on “yes”.
You will find some default code written in it, just read it. Some syntax significance:
·       ^  is for “ctrl”
·       !  is for “Alt”
·       #  is for Window key
·       ; is for comments.
Now you need to copy the below code and paste in that script file. Then
#IfWinActive ahk_class ConsoleWindowClass
^V::
SendInput {Raw}%clipboard%
return
#IfWinActive
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 . 

When this gets executed first it checks whether console is open or not, and then “^V::” is indicates when Ctrl + V is pressed execute next code.
To directly download this script  click here.

Some of the other basic tasks for which I have generated hot keys are:
·        Ctrl + up and Ctrl + Down in Command Prompt for scrolling.
·        Automatic save my document in specified period of time.
·        Move/Copy data from specified folder to other specified folder.
·        A hotkey to open specified folder/file.
·        A hotkey to run specified application.
·        A hotkey to open specified website.
·        And many more…
      The script for above task will be posted soon on this blog in  “Simplify Windows" Series.

3 comments:

  1. Hmm! So Windows users need help ha and you're helping them! Nice post . . .

    ReplyDelete
  2. Hey Linuxer...I m just tring to make windows much friendly by not to rely only upon microsoft...

    ReplyDelete