Until %TriggerValue% "is up"

Thanks so much for the reply. Here's what I'm trying to replace (in this macro):

Pasted_Image_12_03_2022__16_30

If the pressed hotkey is released during the repeat period, PressLength is set to short. How would I incorporate your idea into this and do you think it might induce lag?