-
Notifications
You must be signed in to change notification settings - Fork 73
Description
Say I have a macro bound to shift which does the following:
postponeKeys holdKey leftShift
Say I do the following:
- press
shift - tap
a - release
shift
a should intuitively be capitalized, but it's not because the holdKey is terminated before the queue is unrolled.
Solving this is not simple, but it may be doable. Maybe make the key release break the postpone for commands which wait for release, but let the scope live until release unroll from the queue? That would get complex with structures like
ifReleased {
doStuff
break
}
Maybe it's not doable, but I wanted to raise the issue anyway.
Maybe the solution is to make a delayUntilPostponedRelease style command which waits for release ignoring the postponed events and errors out if it's called in a postponed scope? Then that command along with pressKey could be used to create any wanted effect explicitly.
I used the simplest macro which demonstrates the issue in the example, and it is in itself a useless macro, but other macros with similar structure may cause issues as well, such as the following triggering secondary on a negative safety margin, which could break the holdKey in the trailing postponed cycle?
ifSecondary holdKey leftShift
else doPrimaryStuff