[
    {
        "name": "Keyboard.Extra",
        "comment": " Convenience helpers for working with keyboard inputs.\n\n# Msg and Update\n\nUsing Keyboard.Extra this way, you get all the help it can provide.\nUse either this approach, or the plain subscriptions and handle the state yourself.\n\n@docs Msg, subscriptions, update, updateWithKeyChange, KeyChange\n\n## Helpers\n\n> **Note:** To find out if a key is being pressed, simply use `List.member key keyList`.\n\n@docs Arrows, arrows, wasd, Direction, arrowsDirection, wasdDirection\n\n\n# Plain Subscriptions\n\nIf you prefer to only get \"the facts\" and do your own handling, use these\nsubscriptions. Otherwise, you may be more comfortable with the Msg and Update.\n\n@docs downs, ups\n\n\n# Decoder\n@docs targetKey\n\n\n# Low level\n@docs fromCode, toCode\n\n\n# Keyboard keys\n@docs Key\n",
        "unions": [
            {
                "name": "Direction",
                "comment": " Type representation of the arrows.\n",
                "args": [],
                "cases": [
                    [
                        "North",
                        []
                    ],
                    [
                        "NorthEast",
                        []
                    ],
                    [
                        "East",
                        []
                    ],
                    [
                        "SouthEast",
                        []
                    ],
                    [
                        "South",
                        []
                    ],
                    [
                        "SouthWest",
                        []
                    ],
                    [
                        "West",
                        []
                    ],
                    [
                        "NorthWest",
                        []
                    ],
                    [
                        "NoDirection",
                        []
                    ]
                ]
            },
            {
                "name": "Key",
                "comment": " These are all the keys that have names in `Keyboard.Extra`.\n",
                "args": [],
                "cases": [
                    [
                        "Cancel",
                        []
                    ],
                    [
                        "Help",
                        []
                    ],
                    [
                        "BackSpace",
                        []
                    ],
                    [
                        "Tab",
                        []
                    ],
                    [
                        "Clear",
                        []
                    ],
                    [
                        "Enter",
                        []
                    ],
                    [
                        "Shift",
                        []
                    ],
                    [
                        "Control",
                        []
                    ],
                    [
                        "Alt",
                        []
                    ],
                    [
                        "Pause",
                        []
                    ],
                    [
                        "CapsLock",
                        []
                    ],
                    [
                        "Escape",
                        []
                    ],
                    [
                        "Convert",
                        []
                    ],
                    [
                        "NonConvert",
                        []
                    ],
                    [
                        "Accept",
                        []
                    ],
                    [
                        "ModeChange",
                        []
                    ],
                    [
                        "Space",
                        []
                    ],
                    [
                        "PageUp",
                        []
                    ],
                    [
                        "PageDown",
                        []
                    ],
                    [
                        "End",
                        []
                    ],
                    [
                        "Home",
                        []
                    ],
                    [
                        "ArrowLeft",
                        []
                    ],
                    [
                        "ArrowUp",
                        []
                    ],
                    [
                        "ArrowRight",
                        []
                    ],
                    [
                        "ArrowDown",
                        []
                    ],
                    [
                        "Select",
                        []
                    ],
                    [
                        "Print",
                        []
                    ],
                    [
                        "Execute",
                        []
                    ],
                    [
                        "PrintScreen",
                        []
                    ],
                    [
                        "Insert",
                        []
                    ],
                    [
                        "Delete",
                        []
                    ],
                    [
                        "Number0",
                        []
                    ],
                    [
                        "Number1",
                        []
                    ],
                    [
                        "Number2",
                        []
                    ],
                    [
                        "Number3",
                        []
                    ],
                    [
                        "Number4",
                        []
                    ],
                    [
                        "Number5",
                        []
                    ],
                    [
                        "Number6",
                        []
                    ],
                    [
                        "Number7",
                        []
                    ],
                    [
                        "Number8",
                        []
                    ],
                    [
                        "Number9",
                        []
                    ],
                    [
                        "Colon",
                        []
                    ],
                    [
                        "Semicolon",
                        []
                    ],
                    [
                        "LessThan",
                        []
                    ],
                    [
                        "Equals",
                        []
                    ],
                    [
                        "GreaterThan",
                        []
                    ],
                    [
                        "QuestionMark",
                        []
                    ],
                    [
                        "At",
                        []
                    ],
                    [
                        "CharA",
                        []
                    ],
                    [
                        "CharB",
                        []
                    ],
                    [
                        "CharC",
                        []
                    ],
                    [
                        "CharD",
                        []
                    ],
                    [
                        "CharE",
                        []
                    ],
                    [
                        "CharF",
                        []
                    ],
                    [
                        "CharG",
                        []
                    ],
                    [
                        "CharH",
                        []
                    ],
                    [
                        "CharI",
                        []
                    ],
                    [
                        "CharJ",
                        []
                    ],
                    [
                        "CharK",
                        []
                    ],
                    [
                        "CharL",
                        []
                    ],
                    [
                        "CharM",
                        []
                    ],
                    [
                        "CharN",
                        []
                    ],
                    [
                        "CharO",
                        []
                    ],
                    [
                        "CharP",
                        []
                    ],
                    [
                        "CharQ",
                        []
                    ],
                    [
                        "CharR",
                        []
                    ],
                    [
                        "CharS",
                        []
                    ],
                    [
                        "CharT",
                        []
                    ],
                    [
                        "CharU",
                        []
                    ],
                    [
                        "CharV",
                        []
                    ],
                    [
                        "CharW",
                        []
                    ],
                    [
                        "CharX",
                        []
                    ],
                    [
                        "CharY",
                        []
                    ],
                    [
                        "CharZ",
                        []
                    ],
                    [
                        "Super",
                        []
                    ],
                    [
                        "ContextMenu",
                        []
                    ],
                    [
                        "Sleep",
                        []
                    ],
                    [
                        "Numpad0",
                        []
                    ],
                    [
                        "Numpad1",
                        []
                    ],
                    [
                        "Numpad2",
                        []
                    ],
                    [
                        "Numpad3",
                        []
                    ],
                    [
                        "Numpad4",
                        []
                    ],
                    [
                        "Numpad5",
                        []
                    ],
                    [
                        "Numpad6",
                        []
                    ],
                    [
                        "Numpad7",
                        []
                    ],
                    [
                        "Numpad8",
                        []
                    ],
                    [
                        "Numpad9",
                        []
                    ],
                    [
                        "Multiply",
                        []
                    ],
                    [
                        "Add",
                        []
                    ],
                    [
                        "Separator",
                        []
                    ],
                    [
                        "Subtract",
                        []
                    ],
                    [
                        "Decimal",
                        []
                    ],
                    [
                        "Divide",
                        []
                    ],
                    [
                        "F1",
                        []
                    ],
                    [
                        "F2",
                        []
                    ],
                    [
                        "F3",
                        []
                    ],
                    [
                        "F4",
                        []
                    ],
                    [
                        "F5",
                        []
                    ],
                    [
                        "F6",
                        []
                    ],
                    [
                        "F7",
                        []
                    ],
                    [
                        "F8",
                        []
                    ],
                    [
                        "F9",
                        []
                    ],
                    [
                        "F10",
                        []
                    ],
                    [
                        "F11",
                        []
                    ],
                    [
                        "F12",
                        []
                    ],
                    [
                        "F13",
                        []
                    ],
                    [
                        "F14",
                        []
                    ],
                    [
                        "F15",
                        []
                    ],
                    [
                        "F16",
                        []
                    ],
                    [
                        "F17",
                        []
                    ],
                    [
                        "F18",
                        []
                    ],
                    [
                        "F19",
                        []
                    ],
                    [
                        "F20",
                        []
                    ],
                    [
                        "F21",
                        []
                    ],
                    [
                        "F22",
                        []
                    ],
                    [
                        "F23",
                        []
                    ],
                    [
                        "F24",
                        []
                    ],
                    [
                        "NumLock",
                        []
                    ],
                    [
                        "ScrollLock",
                        []
                    ],
                    [
                        "Circumflex",
                        []
                    ],
                    [
                        "Exclamation",
                        []
                    ],
                    [
                        "DoubleQuote",
                        []
                    ],
                    [
                        "Hash",
                        []
                    ],
                    [
                        "Dollar",
                        []
                    ],
                    [
                        "Percent",
                        []
                    ],
                    [
                        "Ampersand",
                        []
                    ],
                    [
                        "Underscore",
                        []
                    ],
                    [
                        "OpenParen",
                        []
                    ],
                    [
                        "CloseParen",
                        []
                    ],
                    [
                        "Asterisk",
                        []
                    ],
                    [
                        "Plus",
                        []
                    ],
                    [
                        "Pipe",
                        []
                    ],
                    [
                        "HyphenMinus",
                        []
                    ],
                    [
                        "OpenCurlyBracket",
                        []
                    ],
                    [
                        "CloseCurlyBracket",
                        []
                    ],
                    [
                        "Tilde",
                        []
                    ],
                    [
                        "VolumeMute",
                        []
                    ],
                    [
                        "VolumeDown",
                        []
                    ],
                    [
                        "VolumeUp",
                        []
                    ],
                    [
                        "Comma",
                        []
                    ],
                    [
                        "Minus",
                        []
                    ],
                    [
                        "Period",
                        []
                    ],
                    [
                        "Slash",
                        []
                    ],
                    [
                        "BackQuote",
                        []
                    ],
                    [
                        "OpenBracket",
                        []
                    ],
                    [
                        "BackSlash",
                        []
                    ],
                    [
                        "CloseBracket",
                        []
                    ],
                    [
                        "Quote",
                        []
                    ],
                    [
                        "Meta",
                        []
                    ],
                    [
                        "Altgr",
                        []
                    ],
                    [
                        "Other",
                        []
                    ]
                ]
            },
            {
                "name": "KeyChange",
                "comment": " The second value `updateWithKeyChange` may return, representing the actual\nchange that happened during the update.\n",
                "args": [],
                "cases": [
                    [
                        "KeyDown",
                        [
                            "Key"
                        ]
                    ],
                    [
                        "KeyUp",
                        [
                            "Key"
                        ]
                    ]
                ]
            },
            {
                "name": "Msg",
                "comment": " `Keyboard.Extra`'s internal message type.\n",
                "args": [],
                "cases": []
            }
        ],
        "aliases": [
            {
                "name": "Arrows",
                "comment": " Record type used for `arrows` and `wasd`.\nBoth `x` and `y` can range from `-1` to `1`, and are `0` if no keys are pressed.\n",
                "args": [],
                "type": "{ x : Int, y : Int }"
            }
        ],
        "values": [
            {
                "name": "arrows",
                "comment": " Gives the arrow keys' pressed down state as follows:\n\n    >>> arrows []\n    { x = 0, y = 0 }\n\n    >>> arrows [ ArrowLeft ]\n    { x = -1, y = 0 }\n\n    >>> arrows [ ArrowUp, ArrowRight ]\n    { x = 1, y = 1 }\n\n    >>> arrows [ ArrowDown, ArrowLeft, ArrowRight ]\n    { x = 0, y = -1 }\n",
                "type": "List Key -> Arrows"
            },
            {
                "name": "arrowsDirection",
                "comment": " Gives the arrow keys' pressed down state as follows:\n\n    >>> arrowsDirection []\n    NoDirection\n\n    >>> arrowsDirection [ ArrowLeft ]\n    West\n\n    >>> arrowsDirection [ ArrowUp, ArrowRight ]\n    NorthEast\n\n    >>> arrowsDirection [ ArrowDown, ArrowLeft, ArrowRight ]\n    South\n",
                "type": "List Key -> Direction"
            },
            {
                "name": "downs",
                "comment": " Subscription for key down events.\n\n**Note** When the user presses and holds a key, there may or may not be many of\nthese messages before the corresponding key up message.\n",
                "type": "(Key -> msg) -> Sub msg"
            },
            {
                "name": "fromCode",
                "comment": " Convert a key code into a `Key`.\n\n    >>> fromCode 13\n    Enter\n",
                "type": "KeyCode -> Key"
            },
            {
                "name": "subscriptions",
                "comment": " The subscriptions needed for the \"Msg and Update\" way.\n",
                "type": "Sub Msg"
            },
            {
                "name": "targetKey",
                "comment": " A `Json.Decoder` for grabbing `event.keyCode` and turning it into a `Key`\n\n    import Json.Decode as Json\n\n    onKey : (Key -> msg) -> Attribute msg\n    onKey tagger =\n      on \"keydown\" (Json.map tagger targetKey)\n",
                "type": "Decoder Key"
            },
            {
                "name": "toCode",
                "comment": " Convert a `Key` into a key code.\n\n    >>> toCode Enter\n    13\n",
                "type": "Key -> KeyCode"
            },
            {
                "name": "update",
                "comment": " Use this (or `updateWithKeyChange`) to have the list of keys update.\n\n_If you need to know exactly what changed just now, have a look\nat `updateWithKeyChange`._\n",
                "type": "Msg -> List Key -> List Key"
            },
            {
                "name": "updateWithKeyChange",
                "comment": " This alternate update function answers the question: \"Did the pressed down\nkeys in fact change just now?\"\n\nYou might be wondering why this is a `Maybe KeyChange` &ndash; it's because\n`keydown` events happen many times per second when you hold down a key. Thus,\nnot all incoming messages actually cause a change in the model.\n\n**Note** This is provided for convenience, and may not perform well in real\nprograms. If you are experiencing slowness or jittering when using\n`updateWithKeyChange`, see if the regular `update` makes it go away.\n",
                "type": "Msg -> List Key -> ( List Key, Maybe KeyChange )"
            },
            {
                "name": "ups",
                "comment": " Subscription for key up events.\n",
                "type": "(Key -> msg) -> Sub msg"
            },
            {
                "name": "wasd",
                "comment": " Similar to `arrows`, gives the W, A, S and D keys' pressed down state.\n\n    >>> wasd []\n    { x = 0, y = 0 }\n\n    >>> wasd [ CharA ]\n    { x = -1, y = 0 }\n\n    >>> wasd [ CharW, CharD ]\n    { x = 1, y = 1 }\n\n    >>> wasd [ CharA, CharS, CharD ]\n    { x = 0, y = -1 }\n",
                "type": "List Key -> Arrows"
            },
            {
                "name": "wasdDirection",
                "comment": " Similar to `arrows`, gives the W, A, S and D keys' pressed down state.\n\n    >>> wasdDirection []\n    NoDirection\n\n    >>> wasdDirection [ CharA ]\n    West\n\n    >>> wasdDirection [ CharW, CharD ]\n    NorthEast\n\n    >>> wasdDirection [ CharA, CharS, CharD ]\n    South\n",
                "type": "List Key -> Direction"
            }
        ],
        "binops": []
    }
]