I have tested all of these features seperately, and used them all together when making my regular letters autoshift, but I have found a baffling set of issues with my symbol layer. Some of these might have been present all along, but not detectable, but I really have no idea how to even diagnose the issues.
When rapidly randomly typing three or more keys in the symbol layer (not less than three keys, and not while typing slowly), at some point(as far as I can tell, at a random point) the hotkeys stop working, either partially or entirely. That is, instead of symbols, all my letters output regular letters, even though the script is still running. Sometimes this happens for a few random presses scattered in the string of symbols I'm typing, sometimes this happens permanently and I can no longer type any symbols with the hotkeys at all.
Also, usually (but not in every variation of the test), Shift gets stuck down, so everything comes out capitalized. I usually have to make my computer sleep and then wake it up again for it to unstick.
Here's the basic code for the hotkeys, though I do have hotkeys for basically every letter key.
Code: Select all
longPress(thisKey, defaultString, longPressString, numOfBackspaces){
startTime := A_TickCount
SendInput(defaultString)
backspaceInput := "{Backspace " numOfBackspaces "}"
; Instead of a sleep or simlar delay, a loop is used so that, in the process of rapid typing, one cannot release the hotkey and then press it again, falsely triggering the script into backspacing, missing that the key had been released
while(GetKeyState(thisKey, "P")) {
endTime := A_TickCount - startTime
if(thisKey = A_PriorKey && endTime > longPressDelay) {
SendInput(backspaceInput)
SendInput(longPressString)
KeyWait(thisKey)
}
}
}
#HotIf currentLayer = "Sym"
q::{
if(A_PriorKey != "q" || A_TimeSincePriorHotkey > 350){
longPress(ThisHotkey, "{Blind}~", "{Blind}$", 1)
} else {
SendInput("{Blind}~")
}
}