diff options
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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> |