Better HN
topnewbestaskshowjobs
Log inSign up

ohmeingot

1 karma · joined Mar 12, 2014 (12y ago) · 1 submissions

Submissions

comment 12y ago · link · parent

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)