proberge-dev / browser-keyboard / Browser.Keyboard

Description

browser-keyboard is intended to help with global keyboard event management.

Event subscription functions

onKeyUp : (Event -> msg) -> Platform.Sub.Sub msg

onKeyPress : (Event -> msg) -> Platform.Sub.Sub msg

onKeyDown : (Event -> msg) -> Platform.Sub.Sub msg

Event data definition


type alias Event =
{ key : String
, code : String
, metaKey : Basics.Bool
, repeat : Basics.Bool
, ctrlKey : Basics.Bool
, shiftKey : Basics.Bool
, altKey : Basics.Bool 
}