How to correct DOuble CApitalization, allow TrIPPLE capitalization.
Posted: 29 Nov 2019, 17:36
This is a code for DUal CApitalization correction.
This is a code for DUal CApitalization correction.
I believe that this code could work much better if it would consider that if I keep holding the shift key, after seeing a correction made, I am probably typing a short abbreviation in ALL CAPS.
How can I change this code so it would correct dual capitalization, yet if I type in a word, and it comes out like ThIS, the lowercase h needs to be replaced with the upper case?
Thank you.
Code: Select all
; Removes DOuble CApitalization - adjust timer to improve precision
;keys = ``1234567890-=qwertyuiop[]\asdfghjkl;'zxcvbnm,./
keys = qwertyuiopasdfghjklzxcvbnm
Loop Parse, keys
HotKey ~+%A_LoopField%, Hoty
Hoty:
StringMid c0, A_PriorHotKey,2, 1
StringMid c1, A_ThisHotKey, 3, 1
If (c0 = "+" and A_TimeSincePriorHotkey < 250)
Send {BS}%c1%
Return
I believe that this code could work much better if it would consider that if I keep holding the shift key, after seeing a correction made, I am probably typing a short abbreviation in ALL CAPS.
How can I change this code so it would correct dual capitalization, yet if I type in a word, and it comes out like ThIS, the lowercase h needs to be replaced with the upper case?
Thank you.