Skip to content

Automatically repeat keystrokes for keyboard.pressKey(...) #563

Description

Short overview
keyboard.pressKey() should automatically repeat the keystrokes of any 'normal' (non-modifier) keys.

Use case
I have a shortcut in my application which increases the text size of a textbox.
The shortcut is: Cmd + Shift + Equals

I would like to automate the process of increasing the text size by a large amount.
To achieve this manually, I can simply press and hold the 'text bigger' shortcut for 5 seconds.

Detailed feature description
To automate the example in nut.js, I thought all I would need to do is keyboard.pressKey(LeftCmd, LeftShift, Equals).
However, this does not repeat the shortcut as I expect.

The added feature would make it so that both modifier and 'normal' keys are repeated when held, potentially at a specified interval.

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