  function updatePs2(a) {
            var req = new XMLHttpRequest();
            req.open("GET", "/ps2?" + a.join('&'));
            req.send();
        }

        function keyDown(e) {
            e.stopPropagation();
            var m = mapping[e.code];
            if (m !== undefined) {
                updatePs2(m);
            } else {
                console.log("Unhandled", e);
            }
        }

        function keyUp(e) {
            console.log(e);
            e.stopPropagation();
          