4 ms·
function arrows(key) { var eventObj = document.createEvent("Events"); eventObj.initEvent("keydown", true, true); eventObj.which = key; document.dispatchEvent(ev
by ohmeingot 13y ago
function arrows(key) { var eventObj = document.createEvent("Events"); eventObj.initEvent("keydown", true, true); eventObj.which = key; document.dispatchEvent(eventObj); }
for (y=0; y<=1000; y++) { arrows(39); arrows(40); arrows(37); arrows(40); }
It works nicely in multiplayer as well. My opponents are probably often surprised. (js credits: varyform)