nut.js icon indicating copy to clipboard operation
nut.js copied to clipboard

Reconsider awaiting on sleep on pressKey/releaseKey when autoDelayMs == 0

Open phckopper opened this issue 2 years ago • 4 comments

Short overview

When calling pressKey/releaseKey, the sleep function is awaited no matter the delay set in autoDelayMs. However, due to the way sleep is implemented, using a setTimeout, a non-negligible delay is introduced nonetheless, and there are no guarantees on its upper bound.

Therefore, I propose that a special case is added to handle a delay of 0, so that applications that require low latency can run as fast as possible.

Use case

  • Low-latency applications
  • Interactive experiences
  • Video-game automation

phckopper avatar Jun 14 '22 14:06 phckopper

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jul 15 '22 02:07 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jul 30 '22 02:07 github-actions[bot]

@s1hofmann is this being prioritized? Just curious

himat avatar Dec 27 '22 17:12 himat

@himat It's not my top priority at the moment.

s1hofmann avatar Dec 27 '22 21:12 s1hofmann