AutoHotKey Useful

I work a lot on my laptop when out on business, and I find that not having an app key (also known as the “right-click menu” key – although that is misleading) is a right royal pain. I like to use the keyboard as much as possible, and the trackpad is terrible.

I noticed this problem when I was going through some emails on my work laptop and marking them as done (I use the ‘Flagged completed’ function to make them disappear from my main folder). I wasn’t using the mouse, so I was using the up and down arrows to select an email, then hit AppsKey > U > M to mark the email complete.

That is, I would have done if my laptop had an app key. Without one, I had to use the mouse/trackpad, which meant taking my hands off the keyboard. I’m no touch-typist, but it was annoying.

“But surely”, you say, “can’t you just use the right trackpad button on the laptop, which is right there by the keyboard and does the same thing?”

First, let’s be clear about the difference between right click and the app key. They are not the same, but they are related:

  1. The app key is the key on a full-size keyboard below the right shift key and to the right of the right super (or Windows) key that that brings up a context-related app menu at the location of the cursor. It looks like a little menu or list, and sometimes has a little mouse pointer on it.
  2. The right button on your mouse brings up the same app menu at the location of the mouse pointer.
  3. If the cursor is in one position, and the mouse pointer is in a different position, pressing the Apps Key will bring up the menu at the location of the cursor, not the mouse pointer.
  4. If the cursor is in one position, and the mouse pointer is in a different position,right-clicking brings up the menu at the location of the mouse pointer.

This meant that if I was relying on the cursor to select items in the email list, moving up and down with the cursor keys, and not looking at the location of the mouse pointer, I needed the Apps Key, otherwise just hitting the right-click button would bring the menu up in the wrong place, and to avoid that I would have to move my hands from the keyboard, move the mouse, and it’s just a whole thing.

I found a solution in the form of AutoHotkey, which was always being plugged by the folks over at Lifehacker. AutoHotkey provides

Fast scriptable desktop automation with hotkeys


a scripting language for desktop automation

and it solved my problem easily. I installed it, and just added the following line to the default script:


All this does is remap the Caps Lock key (which I never use) to the App Key, so that now on my laptop I can easily bring up the app menu without using the mouse.

In addition, I added these lines:

^;::send %A_YYYY%-%A_MM%-%A_DD%
^+;::send [[%A_YYYY% %A_MM% %A_DD% %A_DDD%]]

These are extra. The first line just expands the very useful Excel and Access functionality of inserting today’s date with Ctrl+; across the whole of Windows. The second line does the same, but wraps the date in double square brackets to easily insert a valid date wiki link in my TiddlyWiki. Of course, the date is in ISO-8601 format to avoid confusion.

AutoHotkey is very powerful and useful, and these examples barely even touch the surface, let alone scratch it. Highly recommended.

Categorized as "Misc"