Skip to content

keyboard type function doesn't type entire string at once #460

Closed
@himat

Description

@himat

It seems the nut.js keyboard type function doesn't type the entire string at once like the robotjs one did?
This is pretty inconvenient when you want to enter in an entire piece of text at once.

If you compare

keyboard.type('hi there');

vs

robot.typeString('hi there');

The first one types char by char which takes a while, whereas the second inputs the entire string instantly into whatever text box you're in.

I saw that I can configure the delay for nut
keyboard.config.autoDelayMs = 50;
But that parameter is not working well. At 100, it types correctly, but if I lower it to 50, I saw the first character was missing, and if I lowered it to 10, many characters were not typed.

Is there a workaround for this that makes the typing equivalent to the robotjs way?

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