aboutsummaryrefslogtreecommitdiff
path: root/src/Main.elm
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-03-22 13:29:45 +0100
committerJoris Guyonvarch2015-03-22 13:29:45 +0100
commit7e442c937e1d0696c2cff591a06e869f92d08595 (patch)
tree8edc523d64b06cdd31c3d19bb93fa87b18de613f /src/Main.elm
parent2abb8ffa46cbe86deedb9ddcbb9b042b51285feb (diff)
Better support from keyboard thanks to event.which on key press
Diffstat (limited to 'src/Main.elm')
-rw-r--r--src/Main.elm5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Main.elm b/src/Main.elm
index 4fab1e9..fda7c01 100644
--- a/src/Main.elm
+++ b/src/Main.elm
@@ -11,6 +11,7 @@ import Keyboard
import Char
import Dict
import List
+import Keyboard (KeyCode)
import Model.Model (..)
import Model.Position (..)
@@ -31,7 +32,7 @@ input =
[ Signal.subscribe updates
, Signal.map DeltaTime (fps 30)
, Signal.map (\_ -> ClickAway) clickAway
- , Signal.map KeyPressed Keyboard.lastPressed
+ , Signal.map KeyPressed keyPress
]
port clickPosition : Signal Value
@@ -52,6 +53,8 @@ port ringingTimers =
model
|> Signal.dropRepeats
+port keyPress : Signal KeyCode
+
port clickAway : Signal ()
port initialTime : Time