aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'index.html')
-rw-r--r--index.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/index.html b/index.html
index 7e3b489..795bf0b 100644
--- a/index.html
+++ b/index.html
@@ -18,7 +18,8 @@
<script>
var timer = Elm.fullscreen(Elm.Main, {
initialTime: new Date().getTime(),
- clickAway: []
+ clickAway: [],
+ keyPress: 0
});
timer.ports.clickPosition.subscribe(function(pos) {
@@ -45,6 +46,10 @@
}
});
+ document.onkeypress = function(event) {
+ timer.ports.keyPress.send(event.which);
+ };
+
</script>
</html>