Keyboard shortcuts can be very effective in speeding up workflows. However, there are two main barriers to using them more extensively:
This short article will describe an approach that requires remembering just one – yes 1 - single solitary keyboard shortcut, and that will display a custom list of keyboard shortcuts specific to the program or website being used at the time. In that sense, it’s a bit similar to a password manager in that instead of remembering those numerous login details which accrete inexorably over time, you just need to remember one to access the password manager. It uses a free program, and doesn’t necessarily require installation on the computer which makes it broadly usable in most workplace settings.
Before I go on, a confession concerning the appealing “universal” component of the title. This – alas – is just good old click-baiting at work. If you use a Mac or Linux computer at work, then it is probably better at this point that you switch to another more truthful article in JoHILA. However, the vast majority of workplaces use Windows, so this approach should be widely applicable (aka “near universal”).
The script (don’t worry – you don’t have to be technically minded to adapt it to your own circumstances) described in this paper essentially does two things:
Down to the nitty gritty. The program involved is AutoHotkey (version 1.1) and it can be downloaded from www.autohotkey.com (> Download > v1.1). It is probably best to do this on your home computer or laptop initially, before migrating it to the work setting.
Steps:
With any luck, you will now have the script from this article running. If the specified program or website has focus, then a popup will display when Ctrl 9 is pressed. You can test by opening Notepad, and when the Ctrl 9 is pressed, you should see a pop up with a few keyboard shortcuts.
Similarly, if you have Google Calendar open in the browser, then pressing Ctrl 9 will display some keyboard shortcuts specific to that site. Worked initially and then stopped? There is only ever one pop up visible, so if you have opened it for one program or website, then you need to close it before a new one will appear for the next program / website.
That’s nice and all, but much better if you can customise to your own programs / websites and keyboard shortcuts.
With any luck, you need never forget a keyboard shortcut again. However, that is on your home computer, what about work? A minority of places allow installation of programs (or perhaps this can be requested from your IT department). However, in many cases this may not be possible at all. In this case, the portable version of AutoHotkey may come to the rescue (it has in my specific work situation). This is available at https://portableapps.com/node/39299 (click on the 1.1 version, it will take you to a mirror site). Move the download onto a USB stick and double click it to install on the thumb drive. Place any scripts you create on the thumb drive and then use at work as above.
(In passing, it can be noted that PortableApps combined with a USB stick can be a useful option in a locked down IT environment, as it allows you to run other useful programs such as Notepad++ (programming), GIMP (image editor), ShareX (screenshots), Greenshot (screenshots), CamStudio (video producer), TinyTask (simple macro record and playback – can be quite useful if you have a very repetitive task).
AutoHotkey can do many many other things, but just two bonus tips while I’m here:
:0*:/we::robpenfold@phcn.vic.gov.au
RAlt::RButton
If you find a script useful, you may like it to start every time the computer does. Right click on the script file and Create Shortcut. Then press the Windows key, type Run and in the resulting screen shell:startup. Cut and paste the shortcut link into that window and now the script will start with the computer.
Finally, you don’t need to be a programmer to gain value from AutoHotkey. The other day I asked ChatGPT to write some AutoHotkey code for a somewhat complex task. It completed this quickly and the script worked as desired.
Appendix 1. Template script (copy everything below)
#SingleInstance force
; 0. COMMENT - comments appear after a semi-colon and don't affect the script
; 1. PURPOSE - This script will display a list of custom keyboard shortcuts when Ctrl 9 is pressed, in a context-sensitive manner, for specified programs and websites. Ctrl 9 (indicated in the script as ^9) doesn’t have to be used – it can be replaced by another keyboard shortcut as desired. Refer to AutoHotkey documentation.
; 2. BROWSER SUPPORT - The stanza below specifies what browsers are supported. You can add or remove browsers as per the article instructions.
GroupAdd, Browsers, ahk_exe chrome.exe
GroupAdd, Browsers, ahk_exe firefox.exe
GroupAdd, Browsers, ahk_exe msedge.exe
; 3. APPLICATIONS
; For Notepad
#IfWinActive ahk_exe notepad.exe
^9::MsgBox,
(LTrim
Save - Ctrl S
Search - Ctrl F
Search / Replace - Ctrl H
Time/Date - F5
)
#IfWinActive
; For Evernote
#IfWinActive?, ahk_exe Evernote.exe
^9::MsgBox,
(LTrim
Body - ALT B
Collapse (side) - F10
Highlight - ALT I
Home - ALT H
Keyboard shortcuts - CTRL /
Link - Alt L (insert Note Link)
Menu - ALT then arrows
Move - ALT M (to Processed)
Move - ALT P (to PBD)
Search - ALT S (advanced like tag:p1, search one tag, do again to add another)
Search - ALT Q (recent, tags, notebooks, saved searches)
Search - CTRL F (find within a note, when in note)
Shortcuts - CTRL 1-9 to select (so Inbox Ctrl 2)
Tag - ALT G (when in note)
Title - ALT T
)
#IfWinActive
; 4. WEBSITES
#IfWinActive ahk_group Browsers
^9::
WinGetActiveTitle, WinT
If InStr(WinT,"youtube")
MsgBox,
(LTrim
Captions - C (if available)
Forward 5 - Right arrow
Fullscreen - F
Mini player - I
Mute / Unmute - M
Play / Pause - Spacebar or K
Search - /
Speed up - > (ie Shift dot)
Volume - Up and down arrow keys
)
Else If InStr(WinT,"calendar")
MsgBox,
(LTrim
Day - D
Week - W
Month - M
Year - Y
Sched - A
Search - /
Previous - P
Next - N
Today - T
Go to Date - G (default to today, then C for create)
Create - C
Edit - E
Save - Ctrl S
)
Return