friedbrice/elm-teaching-tools/1.0.1

ElmTeachingTools.Lib.Keyboard

A library for detecting key presses and releases.

= KeyDown Key
| KeyUp Key

An event that triggers whenever a key is pressed down or released.

type Key
= Key_Escape
| Key_F1
| Key_F2
| Key_F3
| Key_F4
| Key_F5
| Key_F6
| Key_F7
| Key_F8
| Key_F9
| Key_F10
| Key_F11
| Key_F12
| Key_Insert
| Key_Delete
| Key_Home
| Key_End
| Key_PageUp
| Key_PageDown
| Key_UpArrow
| Key_LeftArrow
| Key_DownArrow
| Key_RightArrow
| Key_Tab
| Key_CapsLock
| Key_Shift
| Key_Control
| Key_Alt
| Key_Backspace
| Key_Enter
| Key_Space
| Key_Backtick
| Key_Hyphen
| Key_Equals
| Key_LeftBracket
| Key_RightBracket
| Key_Backslash
| Key_Semicolon
| Key_Apostrophe
| Key_Comma
| Key_Period
| Key_Slash
| Key_1
| Key_2
| Key_3
| Key_4
| Key_5
| Key_6
| Key_7
| Key_8
| Key_9
| Key_0
| Key_Q
| Key_W
| Key_E
| Key_R
| Key_T
| Key_Y
| Key_U
| Key_I
| Key_O
| Key_P
| Key_A
| Key_S
| Key_D
| Key_F
| Key_G
| Key_H
| Key_J
| Key_K
| Key_L
| Key_Z
| Key_X
| Key_C
| Key_V
| Key_B
| Key_N
| Key_M

A Key represents a physical key on the keyboard, not a character. In particular, a Key does not distinguish between lower case and upper case.

Subscribe to keyboard events.