This is just a simplified example version, so you don't care if it makes sense or not. My macro copies data from a spreadsheet, triggers an action, and I like to press [OPTION] after performing some actions that cannot be done with the computer. As long as I'm fast enough, everything works. However, let's say I'm distracted during the whole process and there is a pause of a minute instead of a few seconds between my [OPTION] presses, then the macro doesn't respond immediately. Sometimes I have to press the key multiple times before the macro continues working. In some cases, repeated pressing causes larger jumps in my spreadsheet.
Is this a known behavior or a solution to fix it?
If it helps, I can record a screencast demonstrating my problem. But I wanted to avoid it if it might be unnecessary.
It would probably help if you uploaded your simplified macro. That's because there are things you might be doing that could affect this. For example, the Pause Until action has a flag called "reduce cpu usage" which is, by default, enabled. (Just turning it off would likely help you.) This could be why it acts slowly after a while. If you uploaded your macro, it would be more likely we could spot the problem.
@Airy's given you the answer, but some background might help with future macros.
KM Triggers are event driven and fire (almost) immediately the event happens. You press a hot key trigger combo, KM is informed that the keys have been pressed, the macro executes.
The "Pause Until..." action is state driven. Every so often the KM Engine checks the current state of your system -- in this case, "is the Option key down" -- and proceeds accordingly. But to check every microsecond, and for ever, would be a tremendous drain on resources so the Engine starts with more frequent checks and then, by default, reduces the frequency as the pause gets longer. That's the "Reduce CPU" option, and is documented near the top of the action's Wiki page.
But even if you turn that off, response will never be "immediate" -- a quick tap of the Option key can be over and done between one state check and the next. So make sure it's a deliberate key press.
Some people don't like to be deliberate, and the solution is to use a Global variable instead. You set that to a known value, like "pause-on", immediately before your "Pause Until..." action. The action's Condition is a check on the contents of that Global variable. And you have another macro, hot key triggered, that sets that Global to another value, like "pause-off".
It doesn't speed up the unpausing -- there will still be that delay until the next scheduled state check -- but it does mean you can be quicker on your key presses.
Thank you so much @Nige_S for this additional information. That makes sense.
I think I'm fine with deliberately pressing the key. But your additional recommendation gives me something to play with if I need it.
Most of the macros I use this feature in are not ones that run for too long.
Thanks again and have a great weekend.