SwiftsNamesake/proper-keyboard/1.0.1

NOTE: this package is not compatible with Elm 0.19.1

Keyboard.Key

Readable key names

Definition

type Key
= A
| B
| C
| D
| E
| F
| G
| H
| I
| J
| K
| L
| M
| N
| O
| P
| Q
| R
| S
| T
| U
| V
| W
| X
| Y
| Z
| Left
| Right
| Up
| Down
| Shift (Maybe Side)
| Ctrl (Maybe Side)
| Alt
| Tab
| CapsLock
| Enter
| Backspace
| Delete
| PageUp
| PageDown
| End
| Home
| Insert
| PrintScreen
| PauseBreak
| Windows
| Command
| ChromeSearch
| Ambiguous (List Key)
| Unknown KeyCode

Represents a Key

type Side
= LeftHand
| RightHand

Type used to distinguish between multiple instances of the same key (such as Left Ctrl and Right Ctrl)

#

fromCode : KeyCode -> Key

Transform a KeyCode to a Key