Closed BraidenPsiuk closed 2 years ago
Thanks, but I'm afraid this will break anyone's code that currently uses USBKeyboard
because the arguments changed.
Do you think you could add delay as the last argument so it'll still work? Something like:
exports.type = function(txt, callback, delay) {
delay = delay||20;
var intr = setInterval(function() {
if (!txt.length) {
clearInterval(intr);
if (callback) callback();
} else {
if (txt[0] in KEY) exports.tap(KEY[txt[0]]);
txt = txt.substr(1);
}
}, delay);
}
Yes, my bad, thanks for catching that!
Great - thanks!
Helpful for emulating keyboards on older, slower devices