Skip to content

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

Open
@joel-duffie

Description

@joel-duffie

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.

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