alexpgp: (Default)
alexpgp ([personal profile] alexpgp) wrote2011-03-16 09:24 am

Autohotkey to the rescue! (Again!)

It turns out Microsoft Word ignores a depressed shift key if you hit the spacebar. It also turns out I often am late in releasing the shift key before depressing the spacebar.

I learned this while using the standalone Windows version of Wordfast, which launches a long and distracting "job analysis" task upon receiving a Shift + Space key combination.

I've been using an application Autohotkey for a while now, pretty much in "beginner mode." But even at my rather modest level, I've got it to where I can pop up a variety of programs by pressing the Windows key together with some other key (e.g., "Windows + 6" runs my home-rolled glossary search program).

Autohotkey excels in the area of replacing text, so I can roll my own keyboard shorthand, e.g.
::tekreks::technical requirements
which expands 'tekreks' into 'technical requirements' as soon as I type a space, tab, comma, period, or any other "end of word" symbol.

Alternatively, I can set such replacement macros to execute as soon as I type the last character, e.g.
:*?:\euro\::{ASC 0128}
which replaces \euro\ with € instantly (which is really great, because you can type r\ea\sum\ea\ and get résumé without any fuss at all).

So on a hunch, I tried the following definition in my Autohotkey code file:
shift & space::
Send {space}
return
And what do you know? It works like a charm.

It sure will make Wordfast easier to use!

Cheers...