Auto Hot Key – One key for all

Heard of Hot Keys? Ahh! They are the keys that are really hot 🙂 Just kidding, Hot Keys are the key combinations that are used to perform some specific operations quickly. Remember the legends? Ctrl+C, Ctrl+V, Ctrl+X.

Does your job require these shortcuts often? Then you must be a programmer (Again Kidding!). It must be a pain to keep stretching your fingers often to use these hotkeys. I just came across an interesting open source scripting language known as Auto Hot Key. AHK is so cool that it provides a lot of cool stuff that you could do with your keyboard. Programs like Visual Studio offers shortcut keys with two or three combinations like Ctrl+K+F(Format text), Ctrl+C+U (Un-comment), etc.

Ouch! My fingers start hurting if I keep on using these shortcut keys right from the morning like Ctrl+X, Ctrl+V (Oh no!! Copied the wrong code), Ctrl+Z (Undo), Ctrl+C (Copy again), Ctrl+V (Paste again). Next, I have to format the code, Oh come on, I’m Mister Fantastic, the elastic man in the Fantastic 4, let me make my fingers reach Ctrl+K+F. Phew! somehow completed the job! Imagine repeating this scenario 50 times a day. Difficult right, here comes the AHK scripts to help you.

“AutoHotkey is a free, open-source scripting language for Windows that allows users to easily create small to complex scripts for all kinds of tasks such as form fillers, auto-clicking, macros, etc.”  This sentence was stolen from the AHK site 🙂

Fine, let me break things down and explain. With AHK you can create substitutes for complex shortcut key combinations like Ctrl+K+F. For instance, you could replace Ctrl+C with a single key like ‘c’, so after executing the AHK script (which doesn’t disturb you and silently runs in the background), if you press ‘c’, Bang!! the selected text is copied. No more two keys for copying, pasting, cutting, saving, etc; The AHK script for the previous functionality goes like this, enter the following text into a text editor and save it with an extension .ahk 🙂

x::Send, ^x

c::Send, ^c

v::Send, ^v

Now you can cut, copy and paste by just using the keys ‘x’, ‘c’ and ‘v’ 🙂 Cool right, No pain, more gain.

This is just a sample of what AHK can do. You could do almost any kind of automation with AHK. In order to execute AHK scripts firstly you need to install AHK in your machine by downloading it from their website, it’s just 3017KB. Install it and then you can run any file that has an extension .ahk.

Awww! I just now read your mind, you were thinking, “What?!! Blindly run some random script just because you told me? Is it safe? What if I’m hacked?” Do not panic, since AHK is open source millions of people will be watching its code and contributing to it if somethings not right it would be removed or informed. Also, there is a large community support for AHK and ready-made scripts for basic tasks. Enjoy using AHK. For more technical posts, follow efficientuser and for funny posts on life skills visit my blog.

Advertisement

5 thoughts on “Auto Hot Key – One key for all

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s