kit
kit copied to clipboard
keyboard.type sometimes skips repeated letters
Platform: Windows Version: 3.33.0
I have a text expansion script for my GitHub profile:
metadata = {
expand: "gh;;",
exclude: true,
};
await keyboard.type("https://github.com/eddiemcconkie");
https://github.com/eddiemcconkie // Expected
https:/github.com/ediemconkie // Actual
The t's in https both make it in, but any other repeated characters get skipped.
@eddiemcconkie fwiw, it's almost always better to use:
await setSelectedText("https://github.com/eddiemcconkie");
So that it just "pastes" it.
keyboard.type is incredibly difficult to debug based on OS/version/etc. If you're familiar with writing TypeScript/node, it's probably best to install the library Script Kit uses https://www.npmjs.com/package/@jitsi/robotjs in your ~/.kenv, then import and try some variations yourself. Does that make sense?
That makes sense! I'll switch over to setSelectedText then