Skip to content

Instantly share code, notes, and snippets.

@chribben
Created August 21, 2013 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chribben/6291696 to your computer and use it in GitHub Desktop.
Save chribben/6291696 to your computer and use it in GitHub Desktop.
SignalForPressingRightOrLeftArrow
import Keyboard
keyToBool x = if x == 0 then False else True
sfx p = lift (\p -> p.x) p
signalX = sfx Keyboard.arrows
xArrowPulse = fpsWhen 10 (keyToBool <~ signalX)
main = lift asText xArrowPulse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment