Closed Cloudkkk closed 2 years ago
why the keyToggle() can't press and hold for few secends?
for example,I wanna hold the “w” for 2s, it should print wwwwwwwwwwww in the box;
I can only find a “w” in the print box,although I set a 2s 。
my code
const robot = require('robotjs'); robot.keyToggle("5","down"); setTimeout(function(){ robot.keyToggle("5","up"); }, 2000);
why the keyToggle() can't press and hold for few secends?
Expected Behavior
for example,I wanna hold the “w” for 2s, it should print wwwwwwwwwwww in the box;
Current Behavior
I can only find a “w” in the print box,although I set a 2s 。
Context
my code
Your Environment