Skip to content

Instantly share code, notes, and snippets.

@mbostock mbostock/index.js
Created Aug 7, 2012

What would you like to do?
Google Hurdles
function key(type, code) {
var e = document.createEvent("Event");
e.initEvent(type, true, true);
e.keyCode = code;
setInterval(function() {
key("keydown", 37);
key("keypress", 37);
key("keyup", 37);
key("keydown", 39);
key("keypress", 39);
key("keyup", 39);
}, 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.