on master help sign in
Fix the directions of `arrows` and `wasd`.
c2def3fevancz
libraries/Keyboard.elm+2−2
@@ -14,12 +14,12 @@ type KeyCode = Int
14-- `{ x = 1, y = 1 }` when pressing the up and right arrows.
14-- `{ x = 1, y = 1 }` when pressing the up and right arrows.
15-- `{ x = 0, y =-1 }` when pressing the down, left, and right arrows.
15-- `{ x = 0, y =-1 }` when pressing the down, left, and right arrows.
16arrows : Signal { x:Int, y:Int }
16arrows : Signal { x:Int, y:Int }
17−arrows = N.directions 37 39 38 40
17+arrows = N.directions 38 40 37 39
18
18
19-- Just like the arrows signal, but this uses keys w, a, s, and d,
19-- Just like the arrows signal, but this uses keys w, a, s, and d,
20-- which are common controls for many computer games.
20-- which are common controls for many computer games.
21wasd : Signal { x:Int, y:Int }
21wasd : Signal { x:Int, y:Int }
22−wasd = N.directions 65 68 87 83
22+wasd = N.directions 87 83 65 68
23
23
24-- Custom key directions so that you can support different locales.
24-- Custom key directions so that you can support different locales.
25-- The plan is to have a locale independent version of this function
25-- The plan is to have a locale independent version of this function