Skip to content

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

Description

@phckopper

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions