Monday, July 16, 2012

Fixing Outlook's Ctrl-D usability bug - with AutoHotkey

The letter S is next to the letter D - on my keyboard anyway.

That means when my lifelong q10sec Ctrl-S twitch hits, there's a 1/200 chance I hit Ctrl-D instead.

In Outlook Ctrl-S saves an email, but Ctrl-D deletes it - without warning. In the midst of my work my email vanishes.

This is annoying, but I usually catch it. I make a trip to the Deleted Items folder and drag the email back to Drafts. The other day, however, I was multitasking and didn't notice I'd deleted my email. It wasn't in the UI, it wasn't in Drafts, I probably assumed I'd sent it. Later I emptied my Deleted Items folder (because, by default, Microsoft's slightly daft Search tool includes Outlook Deleted Items, I keep that folder empty).

The email was gone. Minor panic ensued the next day. Fortunately I realized the email was lost, so I responded with an apology rather than being obnoxious.

I resolved to fix the bug. I found very little on the web, really just this one unanswered question: Ctrl-D del adjacent to Ctrl-S save. Either this afflicts very few people, or most don't realize what's happening.

So I asked on our corporate social network (Yammer) and a colleague gave me the answer. He wrote me an AutoHotkey macro that swallows the Ctrl-D key when Outlook is running.
;-------------------------------------------------------------------------------------
#ifwinactive ahk_class rctrl_renwnd32
^d::
return
It works!

Since I grew up on TSRs (if you don't know what that means then you are blessed in more ways than one) so I try to avoid system hacks like this, but Outlook's Ctrl-D bug has broken me. Since I've signed up, I now need to find other ways to use this utility...

No comments: