This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.1.0
Event handlers for sending content and triggering actions with keypresses.
version 1.0.0
license MIT
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.0.0
Committed At 2018-06-30 11:15:31 UTC
elm-lang/html 2.0.0 <= v < 3.0.0 2.0.0
elm-lang/core 5.1.1 <= v < 6.0.0 5.1.1

Modules

README

elm-hotkeys

MIT License

Event handlers for sending content and triggering actions based on keypresses.

Install

elm package install kmbn/elm-hotkeys

Import

import Hotkeys exposing (onEnterSend)

Use

input [ placeholder "Enter content", onEnterSend NewContent ] []

See ../examples/onEnterSend.elm for a working example

Functions

onEnterSend

Send content only when enter is pressed. Do not send anything beforehand.

This is an alternative to using Html.Events.onInput to update the model with incomplete content on every keystroke and then using another event handler to indicate that the content collected in the model is now complete.

Instead, we only send content to update when the content is ready to be consumed.

License

MIT

Copyright

© 2018 Kevin Brochet-Nguyen