Specifically to this line
Code: Select all
keys = ``-=[]\;',./!@#$^&*()_+: ; ← Can't add " here or it breaks
Loop Parse, keys
HotKey ~%A_LoopField%, ~Space ; Special chars to keep 2 capitals before
Full code if needed,
Code: Select all
;
keys = ``1234567890-=qwertyuiop[]\asdfghjkl;'zxcvbnm,./
Loop Parse, keys
HotKey ~+%A_LoopField%, Hoty ; Shifted keys to monitor
keys = 1234567890qwertyuiopasdfghjklzxcvbnm
Loop Parse, keys
HotKey ~%A_LoopField%, Normal ; Unshifted keys to register as hotkeys
keys = ``-=[]\;',./!@#$^&*()_+: ;!@#$%^&*()_+
Loop Parse, keys
HotKey ~%A_LoopField%, ~Space ; Special chars to keep 2 capitals before
Hoty:
CapCount := SubStr(A_PriorHotKey,2,1)="+" && A_TimeSincePriorHotkey<999 ? CapCount+1 : 1
IfEqual CapCount,2, SendInput % "{BS}{" SubStr(A_ThisHotKey,3,1) "}"
IfEqual CapCount,3, SendInput % "{Left}{BS}+{" SubStr(A_PriorHotKey,3) "}{Right}"
Normal:
Return
~Shift Up:: ; Handle CamelCase
key0 := SubStr(A_PriorHotKey,2,1)="+" && A_TimeSincePriorHotkey<999 && CapCount=2
? SubStr(A_PriorHotKey,3) : ""
Return
~Space:: ; Restore 2 capitals before special chars
If (key0 <> "" && A_PriorHotKey = "~Shift Up" && A_TimeSincePriorHotkey<999)
SendInput % "{Left}{BS}+{" key0 "}{Right}"
Return