const robot = require('robotjs');
function start(st, end) {
setTimeout(() => {
st();
}, 5000);
setTimeout(() => {
end();
}, 15000)
}
start(
() => {
robot.keyToggle("w", "down");
},
() => {
robot.keyToggle("w", "up");
}
);