Before we get into custom shortcut keys in windows , have a look at in built shortcut keys here..
If you still want to go further into a whole new world of customization and automation, provided you are just a little familiar with any programming language or scripting language or at least able to jot down your own custom scripts after looking at few examples, then you should try Auto Hot Key.
It is a scripting language used for desktop automation and it’s incredibly powerful as well as fast. Moreover it’s free and open source software. At the same time its light weight (~2 MB), meaning you can download, set-up and start using it within five minutes or so.
How to Script?
Before we begin, keeping the following basic symbolic representations in mind will help while scripting:
# Window Logo Key
^ Control (Ctrl) Key
! Alt Key
+ Shift Key
< Uses left pair of key (in cases of Ctrl, Alt and Shift)
> Uses right pair of key
* Wildcard (Any modifier)
UP Upon Release
; Comments (optional)
Lets Script Now!
Here are few examples on how you can create your own scripts
Script 1: Create your own Ctrl/Alt/Shift Combos
^!C:: Run Calc (Ctrl + Alt + C)
!T:: Run Taskmgr (Alt + T)
*^N:: Run Notepad (Ctrl + N)
- When you press Ctrl (^), Alt(!) and C , you will get Calculator.
- Note that there is no space between symbols and characters.
- Wildcard (*) allows you to launch Notepad even when you are holding down any other modifier keys.
- You can create any key combination and try it.
- Be careful while choosing the combination as you might interfere your shortcuts with built-in ones.
Script 2: Fix a missing key issue
Is this Menu key missing in your laptop’s keyboard like mine?
Or sometimes some other keys from your keyboard might be missing physically or are not working anymore due to some reasons, at such times AHK is a life savior.
This problem can be addressed by following script:
^.:: AppsKey (Ctrl + Full stop)
^/:: RButton (Ctrl + Forward slash)
Both line work similar to some extent as Right Click of mouse button for generating menus.
Script 3: Your own Speed Dial
If you are accustomed with the speed dial function of phones and want similar function in your PC then try this script:
Numpad0 & Numpad1::Run Calc
When you hold Numpad0 and press Numpad1 you will get calculator.
Numpad0 & Numpad2::Run Notepad
Numpad0 & Numpad3::Run Pbrush
Numpad0 & Numpad4::Run Cmd
Numpad0 & Numpad5::Run Explorer
Numpad0 & Numpad6::Run Taskmgr
Numpad0 & Numpad7::Run Gpedit.msc
Numpad0 & Numpad8::Run Diskpart
Numpad0 & Numpad9::Run itunes
The last line makes sure that the prefix key (Numpad0) still works for its native purpose.
Script 4:Expand your Abbreviations
Have you ever wondered if the abbreviations or acronyms would expand on their own when typed, then your dream will come true today with the help of following scripts.
::hru::how are you
How it use bring such scripts into action ???
1. Once you are done with setup, you will get the tray icon of Auto Hot Key in your System Tray.
2. Right click the tray icon and select “Edit this script”
Menu>Edit this script
3. Notepad (or default text editor) will open up the default script file where you can simply add your script at the end.
4. Once you are done with scripting (which we discussed above), don’t forget to save the script file. (Ctrl+s would work fine.)
5. Then “Reload the Script” to apply your script into action.
Menu>Reload This Script
6. You are good to go now for testing your hot key scripts that you just added.
The script samples shown here are just the tip of an iceberg. Auto hot key supports even more features like Key Remapping, GUI Interfacing with controls, Parsing feeds with Regular Expressions etc. You can do much more interesting stuff with AHK.
All the sample script mentioned above are available in this sample file