Utility functions for handling keyboard events in Elm.
This module provides a way to bind messages to specific keys.
It exposes helpers for keydown, keyup, and keypress events, with or without preventDefault.
Attach a keydown listener.
Attach a keydown listener and prevent the default browser action.
Attach a keyup listener.
Attach a keyup listener and prevent the default browser action.
Attach a keypress listener.
Attach a keypress listener and prevent the default browser action.
import AvardaUi.Util.KeyPress as KeyPressUtil
view : Html Msg
view =
Html.input
[ KeyPressUtil.onKeyDown [ ( KeyPress.Enter, HandleSubmit ) ]
]
[]
Supported keyboard keys so far.