New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard should have a signal of keypresses as well as than isDown states #49

Closed
jameshfisher opened this Issue Dec 14, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@jameshfisher

jameshfisher commented Dec 14, 2014

The Mouse module has isDown and clicks. The Keyboard module only has isDown. I would like a function keypresses : KeyCode -> Signal (), analogous to Mouse.clicks.

I've implemented it like this, but there's probably a better way, and it would be nice if this functionality were in core:

keypresses : KeyCode -> Signal ()
keypresses c = isDown c |> keepIf identity False |> map (always ())
@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz May 11, 2016

Member

I believe this is resolved with elm-lang/keyboard

Member

evancz commented May 11, 2016

I believe this is resolved with elm-lang/keyboard

@evancz evancz closed this May 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment