AutoHotKey: Remap Caps Lock as Control AND Backspace

Recently I decided I wanted to try Emacs, but I quickly realized the inconvenience of reaching down for the Control key with my left pinky all the time. I read about remapping the Caps Lock key to Control. However, there was a caveat — I already map my Caps Lock key to Backspace, using AutoHotKey on Windows. (And it's too good — no way I was going to give up that!)

I thought I could map my Caps Lock key to act as a Control key, but send a Backspace key press if I released it without pressing any other key. I reached up to Google to check if such a solution already existed, but came up with nothing. Not letting this discourage me, I hacked up a script within minutes, which I decided to share here in the hopes that it's helpful to you.


Send {LControl Down}
KeyWait, CapsLock
Send {LControl Up}
if ( A_PriorKey = "CapsLock" )
	Send {Backspace}
Any questions? Wanna say thanks? Reach me at fwompner gmail com. :)