ЕО
Size: a a a
ЕО
ЕО
GP
GP
ЕО
ЕО
GP
onMoving :: forall e. Filterable e => (MovingKey -> Moving) -> e String -> e Moving
onMoving m e = E.filterMap (toMovingKey >>> (map m)) e
GP
GP
toMovingKey :: String -> Maybe MovingKey
toMovingKey x
| x == "KeyA" = Just A
| x == "KeyW" = Just W
| x == "KeyS" = Just S
| x == "KeyD" = Just D
| otherwise = Nothing
GP
onMoving :: forall e. Filterable e => (MovingKey -> Moving) -> e String -> e Moving
onMoving m e = E.filterMap (toMovingKey >>> (map m)) e
data Moving = Press MovingKey | Up MovingKey
derive instance eqMoving :: Eq Moving
onMovingStart :: E.Event Moving
onMovingStart = onMoving Press E.down
onMovingEnd :: E.Event Moving
onMovingEnd = onMoving Up E.up
ЕО
KV
p
AG
AG
ЗП
NI
p