I’m attempting to setup a macro that does the following:
When tapped once, alt-tab
When double-tapped, it will hold down the alt key, press tab once, and continue holding the alt key indefinitely
When pressed again after a double tap, it will release the alt key
This is what I’ve got so far, which works as far as getting into the held state, but it seems like I’m confused about the keycode for alt, and possible about the lifecycle of holdkey?
The single alt-tab works, but the alt hold does not, additionally it’s been sending the letter A instead of alt
ifDoubletap {
if ($altTabState == 0) {
holdKey A
tapKey tab
setVar altTabState 1
exit
}
}
else {
if ($altTabState == 1) {
releaseKey A
setVar altTabState 0
}
else {
tapKey A-tab
}
}