Send keystrokes of the clipboard contents with AutoHotkey

I have seen many times where I cannot paste the text in the remote login session due to the policy of clipboard restriction. And, here is the little Auto Hotkey script that can automatically type whatever the clipboard has. Save the following line of code in notepad with .ahk extension and run the script in the background. Make sure AutoHotkey program is installed in your computer first. Or you can compile the script into executable file to use in other computers where AutoHotkey is not installed. See Fig-1.

#Z::Send {Text}%Clipboard%

Here, # means you will need to use Windows key and Z to paste the clipboard contents. You can use the other hot keys combination as well. For example, if you use !A then, the script will take action when you press Alt+A. See doc for details.

SymbolDescription
^Control
+Shift
!Alt
#Left Win or Right Win
Hot key mappings
Fig-1: You can just run the script in the background or compile into exe file
Fig-2: You can exit the script from here

Leave a Reply

Your email address will not be published. Required fields are marked *