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

Automatically repeat keystrokes for `keyboard.pressKey(...)`

Open joel-duffie opened this issue 11 months ago • 0 comments

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.

joel-duffie avatar Feb 29 '24 19:02 joel-duffie