AutoHotkey

Sunday 15 April 2007

One problem I find with laptops: the keyboards have been modified to fit into the small space available. Usually this means moving around the "extra" keys so that the letters and numbers can be full size. And usually, one or more of these compromises seems really stupid to me.

For example, my current Toshiba laptop has a bottom row of keys like this:

[Ctrl][Fn][Alt][`~][     Space    ][Ins][Del][Alt]

What!? Ins, but no right Ctrl? Are these people crazy? Who uses Ins any more?

To fix this problem, I found AutoHotkey, one of those single-minded Windows utilities which takes a seemingly small domain and makes the most of it. AutoHotkey remaps keys and key sequences. With it, I could remap the Ins key to mean Ctrl, fixing my keyboard.

I also found that my left thumb was hurting more than my other digits, and that my Alt-Tab habit was aggravating it. I would tuck my left thumb under to the left Alt key, and hit the Tab key with my ring finger. Very quick, but also contorted. With AutoHotkey, I remapped that key combination to not do Alt-Tab, breaking me of the habit. Now I use the right Alt key with my right hand, press the tab key with my left hand, and my discomfort is much reduced.

The AutoHotkey scripting language can do many things, my little script only scratches the surface:

Ins::Ctrl
RAlt & Tab::AltTab
RAlt & CapsLock::ShiftAltTab
LAlt & Tab::MsgBox Boo!

This says:

  • Ins should be treated as Ctrl
  • Right-Alt and Tab should do an Alt-Tab
  • Right-Alt and CapsLock should do a Shift-Alt-Tab (rotate applications backwards)
  • Left-Alt and Tab should put up a message box that says "Boo!"

There's lots more that AutoHotkey can do that I haven't even begun to explore, like sending Windows messages, manipulating windows, and so on. But the few things I need it to do, it does well.

tagged: » 5 reactions

Comments

[gravatar]
Bill Mill 9:44 AM on 16 Apr 2007

I used it to give iTunes and MediaMonkey global windows hotkeys (before I switched to foobar2000, anyway).

[gravatar]
Malcolm Tredinnick 9:33 PM on 16 Apr 2007

Couldn't agree more about the annoyances of keys moving around.

No right Ctrl key seems to be an annoying trend on laptops these days. Do those keyboard designers never hit Ctrl-P? Are they stuck in a world where keyboard shortcuts are illegal so as to keep productivity down to a minimum? *sigh*

Moving ~ around seems to be a fun game with keyboard designers, too. With three desktop keyboards and a laptop keyboard in my view right now, the tilde is in three different locations. Clearly an anti-trust violation right there, since it's preventing ease of use of a very handy Bourne-shell shortcut.

And if people don't stop moving the Escape key around, there's going to be trouble! Make up your minds about whether it goes next to F1 or under it. I'm tired of missing that key and hitting F1 just because I changed computers and this particular keyboard has moved it.

[gravatar]
Ben Finney 7:24 PM on 18 Apr 2007

Who uses Ins? People who want to switch modes in Vim safely, that's who.

Microsoft can take my Ins key when they pry it from my clammy, moon-tanned hands.

[gravatar]
Loz 5:14 PM on 20 Apr 2007

Last time I bought a laptop I ignored about half of those on offer who though Fn was an acceptable key for the bottom left position.

[gravatar]
Kris 2:26 PM on 12 May 2008

I can't stand the new keyboards with no Insert key! Some of them even eliminate it by making the delete key take up both spaces... WTF?!? Are they trying to save the cost of one extra switch?

Am I the only person on earth who still uses overwrite on a regular basis? Or perhaps still uses the old DOS copy(ctrl + ins), cut(shift + del), & paste(shift + ins) commands? Ok, fine, the answer to that one may be yes, but still... LEAVE THE INSERT KEY ALONE!!

Add a comment:

name
email
Ignore this:
not displayed and no spam.
Leave this empty:
www
not searched.
 
Name and either email or www are required.
Don't put anything here:
Leave this empty:
URLs auto-link and some tags are allowed: <a><b><i><p><br><pre>.