Adapted to AutoHotkey v2 and improved to capitalize the first letter whether or not it is preceded by a space.
Code: Select all
#Requires AutoHotkey v2.0
~NumpadEnter::
~Enter::
~.::
~!::
~?::
{
char1 := InputHook("L1 V C"," {LShift}{RShift}", "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z") ; captures 1st character, visible, case sensitive ; .abc → .Abc
char1.Start()
char1.Wait()
if (char1.EndReason = "Match") {
send "{Backspace}+" char1.Input
exit
}
char2 := InputHook("L1 V C"," {LShift}{RShift}", "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z") ; captures 2nd character, visible, case sensitive ; . abc → . Abc
char2.Start()
char2.Wait()
if (char2.EndReason = "Match")
send "{Backspace}+" char2.Input
}
Updates will be posted here on GitHub.
Some AHK v1 auto-capitalisation scripts are good - such as the one by Xtra linked above and one from computoredge; some didn't work for me, like the one here that caused errors with tab and mouse click; and there are many others out there too. Try a few and see what works for you.