[
    {
        "name": "Keyboard.Extra",
        "comment": " Convenience helpers for working with keyboard inputs.\n\n# Intelligent Helper\n\nUsing Keyboard.Extra this way, you get all the help it can provide.\nYou should not use this together with the plain subscriptions.\n\n@docs State, Msg, subscriptions, initialState, update, KeyChange, updateWithKeyChange\n\n## Helpers\n@docs isPressed, pressedDown\n\n## Directions\n@docs 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 Intelligent Helper.\n\n@docs downs, ups\n\n\n# Decoder\n@docs targetKey\n\n\n# Keyboard keys\n@docs Key\n\n\n# Low level\n@docs fromCode, toCode\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": " The message type `Keyboard.Extra` uses.\n",
                "args": [],
                "cases": []
            },
            {
                "name": "State",
                "comment": " The internal representation of `Keyboard.Extra`. Useful for type annotation.\n",
                "args": [],
                "cases": []
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "arrows",
                "comment": " Gives the arrow keys' pressed down state as follows:\n\n- `{ x = 0, y = 0 }` when pressing no arrows.\n- `{ x =-1, y = 0 }` when pressing the left arrow.\n- `{ x = 1, y = 1 }` when pressing the up and right arrows.\n- `{ x = 0, y =-1 }` when pressing the down, left, and right arrows (left and right cancel out).\n",
                "type": "State -> Arrows"
            },
            {
                "name": "arrowsDirection",
                "comment": " Gives the arrow keys' pressed down state as follows:\n\n- `None` when pressing no arrows.\n- `West` when pressing the left arrow.\n- `NorthEast` when pressing the up and right arrows.\n- `South` when pressing the down, left, and right arrows (left and right cancel out).\n",
                "type": "State -> Direction"
            },
            {
                "name": "downs",
                "comment": " Subscription for key down events.\n\n**Note** When the user presses and holds a key, there will be many of these\nmessages before the corresponding key up message.\n",
                "type": "(Key -> msg) -> Sub msg"
            },
            {
                "name": "fromCode",
                "comment": " Convert a key code into a `Key`.\n",
                "type": "KeyCode -> Key"
            },
            {
                "name": "initialState",
                "comment": " Use this to initialize the component.\n",
                "type": "State"
            },
            {
                "name": "isPressed",
                "comment": " Check the pressed down state of any `Key`.\n",
                "type": "Key -> State -> Bool"
            },
            {
                "name": "pressedDown",
                "comment": " Get the full list of keys that are currently pressed down.\n\nThe newest key to go down is the first in the list and so on.\n",
                "type": "State -> List Key"
            },
            {
                "name": "subscriptions",
                "comment": " You will need to add this to your program's subscriptions.\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",
                "type": "Key -> KeyCode"
            },
            {
                "name": "update",
                "comment": " You need to call this (or `updateWithKeyChange`) to have the set of pressed\ndown keys update. If you need to know exactly what changed just now, have a look\nat the `updateWithKeyChange`.\n",
                "type": "Msg -> State -> State"
            },
            {
                "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 -> State -> ( State, 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- `{ x = 0, y = 0 }` when pressing none of W, A, S and D.\n- `{ x =-1, y = 0 }` when pressing A.\n- `{ x = 1, y = 1 }` when pressing W and D.\n- `{ x = 0, y =-1 }` when pressing A, S and D (A and D cancel out).\n",
                "type": "State -> Arrows"
            },
            {
                "name": "wasdDirection",
                "comment": " Similar to `arrows`, gives the W, A, S and D keys' pressed down state.\n\n- `None` when pressing none of W, A, S and D.\n- `West` when pressing A.\n- `NorthEast` when pressing W and D.\n- `South` when pressing A, S and D (A and D cancel out).\n",
                "type": "State -> Direction"
            }
        ],
        "binops": []
    }
]