Extend the life of your fingers and shave minutes off just about everything you do.
As a software developer I live and breathe shortcut keys. I use them to quickly navigate between screens, auto type out the current date and time, type my email address, and generate commonly used SQL scripts. All within the reach of a few well laid out key combinations.
This blog is your starter kit for time-saving shortcuts. In future blogs, I will add tips and tricks on how to expand your library of shortcuts.
Step 1: What tool should I use?
I’ve tried several tools over the past several years. And for the past 3-4 years I’ve stuck with AUTOHOTKEY at https://autohotkey.com.
Visit the AutoHotkey website and download the free utility (click the download button on the home page and then click the blue installer link.)
I’m sure there are several other well-respected players in this arena, but settling and excelling at one is half the battle. All examples moving forward will refer to AUTOHOTKEY (AH) scripts, so if you find reason to use another text expander or hot key utility, you can still glean ideas from this series of postings – but the scripts here will be specific to AH.
Step 2: How do I determine what key combinations to use without stepping on Windows or MS-Office applications?
Feel free to come up with your own method. What works best for me is CTRL+SHIFT+ (the first letter of what I want to do). I could be wrong, but the CTRL+SHIFT seems to be the least used or captured combination by Windows. It’s impossible to not step on a few already built in hotkeys, so you’ll just have to test for availability.
This is small sampling of what I use:
CTRL+SHIFT+D | Opens explorer to my commonly used folder (For me it’s my development folder) |
CTRL+SHIFT+T | Opens my browser to a timecard app |
CTRL+SHIFT+U | Will change a highlighted section of text to upper case |
WIN+8 | Will type out the current date and time i.e. [01/24/2017 Tuesday 02:32:26 PM] |
Type –dd | Will also type out the current date and time |
CTRL+SHIFT+C | Will open my Outlook calendar |
CTRL+SHIFT+M | Will open my Outlook inbox and jump to the most recent email |
CTRL+SHIFT+1 | Will jump to my Outlook tasks, and create a new task and place the cursor on the subject like for me to start typing |
CTRL+SHIFT+I | Open Internet Explorer |
CTRL+SHIFT+~ | Opens OneNote and puts my cursor on the search bar |
I know what you are thinking – that’s all wonderful but just show me how.
Step 3: How do I make this all work?
AUTOHOTKEY doesn’t have a fancy user interface, so I’ll walk you through this part. If you run the AH program, it will simply launch a help file and point you to some steps, which I’m going to point out below.
The way it works is that you create one script and store a collection of commands in that file. Then when you double click on the file, the script will load into memory so that it can intercept your hot keys. Instead of clicking on the file each time I startup my machine, I just put a shortcut to the file in the auto load of windows.
Here’s how:
- Download and install the AUTOHOTKEY program https://autohotkey.com
- Right-Click on your desktop
- Find “New” in the menu
- Click “AUTOHOTKEY Script” inside the “New” menu
- Give the script a new name
- Find the newly created file on your desktop and right-click it
- Click “Edit Script”
- A window should have popped up, probably Notepad. If so, SUCCESS!
NOTE: When a colleague tested this, the Notepad document populated with some text in it. If this happens to you, just delete all of those lines of text so you are starting with a blank slate.
Now it’s time to edit the file. If you have made it this far, hang in there, we are getting to the fun part. If some of this doesn’t make sense, well that’s ok – just copy and paste the script below.
Once you install AH, if you just run the program you will see a ‘Getting Started’ page that will lead you through a tutorial. Follow the steps in the tutorial example to set up your first script.
Your second script:
I find that I have to type out the date and time on documents all the time. This script will do just that. I set it up to use the Windows Key and 8 on the keypad at the same time. This works wherever your cursor is at – in a Word document, email, OneNote, or basically anywhere that you can type.
I.e. 08/09/2017 Wednesday 01:08:27 PM
Put the following in your master AH file and reload it (reloading is just double-clicking on it). If you get a popup message about an earlier instance of the AH file, just click Yes.
; ------------------------------------------------Type out Date and Time #NumPad8:: FormatTime, dateVar,,MM/dd/yyyy dddd hh:mm:ss tt Send %dateVar%, {Space} Return ; ------------------------------------------------Type out Date and Time
On future blogs I will release other useful examples. Let me know what you think in the comments. Did you run into any issues? Do you like these shortcuts? What would you like to see for future posts?