@@ -4,7 +4,7 @@
44
55module Keyboard where
66
7−import Native.Keyboard
7+import Native.Keyboard as N
88
99type KeyCode = Int
1010
@@ -15,26 +15,26 @@ type KeyCode = Int
1515-- `{ x = 1, y = 1 }` when pressing the up and right arrows.
1616-- `{ x = 0, y =-1 }` when pressing the down, left, and right arrows.
1717arrows : Signal { x:Int, y:Int }
18−arrows = Native.Keyboard.dir 37 39 38 40
18+arrows = N.directions 37 39 38 40
1919
2020-- Just like the arrows signal, but this uses keys w, a, s, and d,
2121-- which are common controls for many computer games.
2222wasd : Signal { x:Int, y:Int }
23−wasd = Native.Keyboard.dir 65 68 87 83
23+wasd = N.directions 65 68 87 83
2424
25+directions : KeyCode -> KeyCode -> KeyCode -> KeyCode -> Signal { x:Int, y:Int }
2526
2627
2728isDown : KeyCode -> Signal Bool
28−isDown = Native.Keyboard.isDown
2929
3030-- Whether the shift key is pressed.
3131shift : Signal Bool
32−shift = Native.Keyboard.isDown 16
32+shift = N.isDown 16
3333
3434-- Whether the control key is pressed.
3535ctrl : Signal Bool
36−ctrl = Native.Keyboard.isDown 17
36+ctrl = N.isDown 17
3737
3838-- Whether the space key is pressed.
3939space : Signal Bool
40−space = Native.Keyboard.isDown 32
40+space = N.isDown 32