Formerly Skinney/keyboard-events. Search finds this package by either name.
This package extends ohanhi/keyboard with functions that produce Html events that fire messages when a given key is pressed. It works as follows:
import Html exposing (Html, input)
import Keyboard exposing (Key(..))
import Keyboard.Events as Keyboard
type Msg =
CloseAutoComplete
autocomplete : Html Msg
autocomplete =
input
[ Keyboard.on Keyboard.Keydown [(Escape, CloseAutoComplete) ]]
[]This package uses the BSD-3 licence.