{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.joinplayspace.com/sdk/playspace.schema.json",
  "title": "playspace.json",
  "type": "object",
  "properties": {
    "controls": {
      "description": "false, or the control manifest. Any other value leaves the controls as the check found them.",
      "anyOf": [
        {
          "type": "boolean",
          "const": false,
          "description": "Turns the on-screen controls off: the work's own touch handling, or its SDK layout, is the controls."
        },
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "v": {
                  "type": "number",
                  "const": 1,
                  "description": "The manifest's version: 1, read, not written (read onto the Playspace set by rule, AV254; write version 3)."
                },
                "move": {
                  "description": "The stick on a phone.",
                  "type": "object",
                  "properties": {
                    "keys": {
                      "type": "array",
                      "prefixItems": [
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        }
                      ],
                      "items": false,
                      "minItems": 4,
                      "maxItems": 4,
                      "description": "The keys the stick holds: up, down, left, right."
                    },
                    "alt": {
                      "description": "A second set the work reads beside them (the arrows beside W A S D); the stick holds both.",
                      "type": "array",
                      "prefixItems": [
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        }
                      ],
                      "items": false,
                      "minItems": 4,
                      "maxItems": 4
                    },
                    "gamepad": {
                      "description": "The pad's stick or d-pad (recorded only).",
                      "type": "string",
                      "enum": [
                        "left",
                        "dpad"
                      ]
                    }
                  },
                  "required": [
                    "keys"
                  ]
                },
                "look": {
                  "default": "none",
                  "description": "How the view turns: the plain mouse, the captured mouse, a drag, or no view. On a phone a drag on the playfield turns it. Absent: none.",
                  "type": "string",
                  "enum": [
                    "mouse",
                    "capture",
                    "drag",
                    "none"
                  ]
                },
                "actions": {
                  "default": [],
                  "description": "The work's verbs by role: every key that acts on a computer gets one, unless the work's own on-screen control or touch already does it at phone size (then it is in `omit`); on a phone what has no place left is a row of the list START opens, never dropped. Absent: none.",
                  "maxItems": 24,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                        "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                      },
                      "role": {
                        "type": "string",
                        "enum": [
                          "primary",
                          "secondary",
                          "action3",
                          "action4",
                          "action"
                        ],
                        "description": "The place on a phone's controller: primary is A, secondary B, action3 X, action4 Y; each action in order R1, L1, R2, L2, then a free place, then the list START opens. One each of primary, secondary, action3 and action4."
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10,
                        "description": "One word, at most 10 characters, shown under the key on a computer and on a long press on a phone."
                      },
                      "icon": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 32,
                        "description": "Read and ignored (no icon is drawn since runtime 1.30.0): any short word, kept so a stored manifest still reads."
                      },
                      "mode": {
                        "type": "string",
                        "enum": [
                          "hold",
                          "tap",
                          "toggle"
                        ],
                        "description": "How a finger presses the key: held while it is down, a press and release on the lift, or a toggle."
                      }
                    },
                    "required": [
                      "key",
                      "role",
                      "mode"
                    ]
                  }
                },
                "slots": {
                  "default": [],
                  "description": "Numbered slots (an inventory, a hotbar), in order: on a phone each takes a place the actions left free (SELECT last), then a row of the list START opens. Absent: none.",
                  "maxItems": 24,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                        "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 10,
                        "description": "One word, at most 10 characters, shown under the key on a computer and on a long press on a phone."
                      },
                      "icon": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 32,
                        "description": "Read and ignored (no icon is drawn since runtime 1.30.0): any short word, kept so a stored manifest still reads."
                      }
                    },
                    "required": [
                      "key"
                    ]
                  }
                },
                "menu": {
                  "description": "The work's own menu key: START on a phone (with a list, START opens it, this key its first row). The player's Home button stays the player's.",
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                      "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 10,
                      "description": "One word, at most 10 characters, shown under the key on a computer and on a long press on a phone."
                    },
                    "icon": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 32,
                      "description": "Read and ignored (no icon is drawn since runtime 1.30.0): any short word, kept so a stored manifest still reads."
                    }
                  },
                  "required": [
                    "key"
                  ]
                },
                "text": {
                  "default": "none",
                  "description": "Typing: none, into the work's own fields, or typing is the play. Absent: none.",
                  "type": "string",
                  "enum": [
                    "none",
                    "field",
                    "play"
                  ]
                },
                "touch": {
                  "default": "none",
                  "description": "The work's own touch: none, its own (every finger is the work's outside the player's places), or a second finger on the playfield reaches it. Absent: none.",
                  "type": "string",
                  "enum": [
                    "none",
                    "own",
                    "multi"
                  ]
                },
                "gamepad": {
                  "description": "A pad's buttons (recorded only).",
                  "type": "object",
                  "properties": {
                    "a": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                      "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                    },
                    "b": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                      "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                    },
                    "c": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                      "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                    },
                    "d": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                      "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                    }
                  },
                  "required": [
                    "a",
                    "b"
                  ]
                },
                "tap": {
                  "default": "work",
                  "description": "A tap on the playfield: the work's own (a tap-to-walk passes through) or the player's click where it landed. Recorded: a tap reaches the work as the click where it lands under either. Absent: work.",
                  "type": "string",
                  "enum": [
                    "work",
                    "click"
                  ]
                },
                "fixed": {
                  "description": "The layout cannot adapt upright.",
                  "type": "boolean",
                  "const": true
                },
                "omit": {
                  "description": "Keys the work reads with no place on a phone on purpose, each with its reason: own-control (an exact duplicate of the work's own on-screen control or touch, or of the player's Sound) or computer-only (a debug, editor or developer key). Every other key the work reads needs a place. Read by Playspace's tools; the player ignores it.",
                  "maxItems": 24,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                        "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                      },
                      "why": {
                        "type": "string",
                        "enum": [
                          "own-control",
                          "computer-only"
                        ],
                        "description": "own-control: already done at phone size by the work's own on-screen control or its own touch (an exact duplicate), or by the player's own bar (its Sound); computer-only: a convenience only a computer has (a debug, editor or developer key)."
                      }
                    },
                    "required": [
                      "key",
                      "why"
                    ]
                  }
                },
                "parity": {
                  "description": "Set by Playspace when it stores the manifest (since AV239): a move under the work's own touch draws the stick. Leave it out.",
                  "type": "boolean",
                  "const": true
                },
                "final": {
                  "description": "Set by Playspace when it stores the manifest (since AV231): the manifest is final, a key it names in no place gets no button. A manifest stored before it, without this, keeps the earlier rule (each heard key it leaves out is a held button in the left column). A file's own value is replaced when the build is stored.",
                  "type": "boolean"
                }
              },
              "required": [
                "v"
              ],
              "description": "The control manifest, version 1: read, not written (read onto the Playspace set by rule, AV254; a new manifest is version 3). Only v is required: a field left out declares nothing there (look none, actions and slots empty, text and touch none, tap work), so a short manifest reads. It names what the player draws on a phone, never every key the work reads. Rules a JSON Schema cannot state, each one dropping the whole manifest when broken: at most 24 keys in all (move, actions, slots, menu and gamepad together), one action each with the role primary, secondary, action3 and action4, and at most 4096 characters as JSON."
            },
            {
              "type": "object",
              "properties": {
                "v": {
                  "type": "number",
                  "const": 2,
                  "description": "The manifest's version: 2, read, not written (its places read onto the Playspace set by rule, AV254; write version 3)."
                },
                "places": {
                  "default": {},
                  "type": "object",
                  "properties": {
                    "LS": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "stick",
                              "description": "A stick: moving (walk, drive, steer, fly); pushed to its rim it is the run."
                            },
                            "keys": {
                              "type": "array",
                              "prefixItems": [
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                },
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                },
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                },
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                }
                              ],
                              "items": false,
                              "minItems": 4,
                              "maxItems": 4,
                              "description": "The keys the stick holds: up, down, left, right."
                            },
                            "alt": {
                              "description": "A second set the work reads beside them (the arrows beside W A S D); the stick holds both.",
                              "type": "array",
                              "prefixItems": [
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                },
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                },
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                },
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                }
                              ],
                              "items": false,
                              "minItems": 4,
                              "maxItems": 4
                            }
                          },
                          "required": [
                            "kind",
                            "keys"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "pad",
                              "description": "A four-way pad: stepping (a grid, a menu, a turn-based move); each arm holds its key while the thumb is on it, a diagonal two."
                            },
                            "keys": {
                              "type": "array",
                              "prefixItems": [
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                },
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                },
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                },
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                }
                              ],
                              "items": false,
                              "minItems": 4,
                              "maxItems": 4,
                              "description": "The keys the pad's arms press: up, down, left, right."
                            },
                            "alt": {
                              "description": "A second set pressed beside them.",
                              "type": "array",
                              "prefixItems": [
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                },
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                },
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                },
                                {
                                  "type": "string",
                                  "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                                  "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                                }
                              ],
                              "items": false,
                              "minItems": 4,
                              "maxItems": 4
                            }
                          },
                          "required": [
                            "kind",
                            "keys"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "button",
                              "description": "One button at the left rest, for a work with no directions."
                            },
                            "key": {
                              "type": "string",
                              "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                              "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 8,
                              "description": "One word, at most 8 characters: drawn in the button on a phone and under the key on a computer."
                            },
                            "mode": {
                              "type": "string",
                              "enum": [
                                "hold",
                                "tap",
                                "toggle"
                              ],
                              "description": "How a finger presses the key: held while it is down, a press and release on the lift, or a toggle."
                            }
                          },
                          "required": [
                            "kind",
                            "key",
                            "mode"
                          ]
                        }
                      ],
                      "description": "The left rest (LS): a stick, a four-way pad, or one button."
                    },
                    "A": {
                      "description": "The right thumb's rest, the largest: the most used verb.",
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8,
                          "description": "One word, at most 8 characters: drawn in the button on a phone and under the key on a computer."
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "hold",
                            "tap",
                            "toggle"
                          ],
                          "description": "How a finger presses the key: held while it is down, a press and release on the lift, or a toggle."
                        }
                      },
                      "required": [
                        "key",
                        "mode"
                      ]
                    },
                    "B": {
                      "description": "Up from A, toward the edge.",
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8,
                          "description": "One word, at most 8 characters: drawn in the button on a phone and under the key on a computer."
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "hold",
                            "tap",
                            "toggle"
                          ],
                          "description": "How a finger presses the key: held while it is down, a press and release on the lift, or a toggle."
                        }
                      },
                      "required": [
                        "key",
                        "mode"
                      ]
                    },
                    "X": {
                      "description": "Up from A, inward: the one pressed together with A.",
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8,
                          "description": "One word, at most 8 characters: drawn in the button on a phone and under the key on a computer."
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "hold",
                            "tap",
                            "toggle"
                          ],
                          "description": "How a finger presses the key: held while it is down, a press and release on the lift, or a toggle."
                        }
                      },
                      "required": [
                        "key",
                        "mode"
                      ]
                    },
                    "Y": {
                      "description": "Above A.",
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8,
                          "description": "One word, at most 8 characters: drawn in the button on a phone and under the key on a computer."
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "hold",
                            "tap",
                            "toggle"
                          ],
                          "description": "How a finger presses the key: held while it is down, a press and release on the lift, or a toggle."
                        }
                      },
                      "required": [
                        "key",
                        "mode"
                      ]
                    },
                    "R1": {
                      "description": "A fifth verb of play: beside A sideways, above Y upright.",
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8,
                          "description": "One word, at most 8 characters: drawn in the button on a phone and under the key on a computer."
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "hold",
                            "tap",
                            "toggle"
                          ],
                          "description": "How a finger presses the key: held while it is down, a press and release on the lift, or a toggle."
                        }
                      },
                      "required": [
                        "key",
                        "mode"
                      ]
                    },
                    "L1": {
                      "description": "Above the left rest: something pressed when not moving (a toggle, a map); never held in a work with a stick.",
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8,
                          "description": "One word, at most 8 characters: drawn in the button on a phone and under the key on a computer."
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "hold",
                            "tap",
                            "toggle"
                          ],
                          "description": "How a finger presses the key: held while it is down, a press and release on the lift, or a toggle."
                        }
                      },
                      "required": [
                        "key",
                        "mode"
                      ]
                    },
                    "SELECT": {
                      "description": "The work's second screen: its inventory (else its map).",
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8,
                          "description": "One word, at most 8 characters: drawn in the button on a phone and under the key on a computer."
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "hold",
                            "tap",
                            "toggle"
                          ],
                          "description": "How a finger presses the key: held while it is down, a press and release on the lift, or a toggle."
                        }
                      },
                      "required": [
                        "key",
                        "mode"
                      ]
                    },
                    "START": {
                      "description": "The work's own pause or menu (its word Menu where it has no label); with `more` it opens the list, its own key the first row.",
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8,
                          "description": "One word, at most 8 characters: drawn in the button on a phone and under the key on a computer."
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "hold",
                            "tap",
                            "toggle"
                          ],
                          "description": "How a finger presses the key: held while it is down, a press and release on the lift, or a toggle."
                        }
                      },
                      "required": [
                        "key",
                        "mode"
                      ]
                    },
                    "R2": {
                      "description": "Reserve, a tap.",
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8,
                          "description": "One word, at most 8 characters: drawn in the button on a phone and under the key on a computer."
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "hold",
                            "tap",
                            "toggle"
                          ],
                          "description": "How a finger presses the key: held while it is down, a press and release on the lift, or a toggle."
                        }
                      },
                      "required": [
                        "key",
                        "mode"
                      ]
                    },
                    "L2": {
                      "description": "Reserve, a tap; never held in a work with a stick.",
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8,
                          "description": "One word, at most 8 characters: drawn in the button on a phone and under the key on a computer."
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "hold",
                            "tap",
                            "toggle"
                          ],
                          "description": "How a finger presses the key: held while it is down, a press and release on the lift, or a toggle."
                        }
                      },
                      "required": [
                        "key",
                        "mode"
                      ]
                    }
                  },
                  "additionalProperties": false,
                  "description": "The controller's places by name (LS A B X Y R1 L1 SELECT START R2 L2), each at most once, any subset: what a work fills is drawn there, nothing moves as places fill."
                },
                "more": {
                  "default": [],
                  "description": "The rows of the plain list START opens, in order: the least used taps. With no START place START reads More. Absent: none.",
                  "maxItems": 24,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                        "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 8,
                        "description": "One word, at most 8 characters: drawn in the button on a phone and under the key on a computer."
                      },
                      "mode": {
                        "type": "string",
                        "enum": [
                          "hold",
                          "tap",
                          "toggle"
                        ],
                        "description": "How a finger presses the key: held while it is down, a press and release on the lift, or a toggle."
                      }
                    },
                    "required": [
                      "key",
                      "mode"
                    ],
                    "description": "A key on this place: the key, its word (else the key's own cap is drawn; on START, Menu), and how a finger presses it."
                  }
                },
                "pair": {
                  "description": "A with X, or B with Y: one flat thumb between the two presses both (both places must be named).",
                  "anyOf": [
                    {
                      "type": "array",
                      "prefixItems": [
                        {
                          "type": "string",
                          "const": "A"
                        },
                        {
                          "type": "string",
                          "const": "X"
                        }
                      ],
                      "items": false,
                      "minItems": 2,
                      "maxItems": 2
                    },
                    {
                      "type": "array",
                      "prefixItems": [
                        {
                          "type": "string",
                          "const": "B"
                        },
                        {
                          "type": "string",
                          "const": "Y"
                        }
                      ],
                      "items": false,
                      "minItems": 2,
                      "maxItems": 2
                    }
                  ]
                },
                "look": {
                  "default": "none",
                  "description": "How the view turns: the plain mouse, the captured mouse, a drag, or no view. On a phone a drag on the playfield turns it. Absent: none.",
                  "type": "string",
                  "enum": [
                    "mouse",
                    "capture",
                    "drag",
                    "none"
                  ]
                },
                "text": {
                  "default": "none",
                  "description": "Typing: none, into the work's own fields, or typing is the play. Absent: none.",
                  "type": "string",
                  "enum": [
                    "none",
                    "field",
                    "play"
                  ]
                },
                "touch": {
                  "default": "none",
                  "description": "The work's own touch: none, its own (every finger is the work's outside the player's places), or a second finger on the playfield reaches it. Absent: none.",
                  "type": "string",
                  "enum": [
                    "none",
                    "own",
                    "multi"
                  ]
                },
                "tap": {
                  "default": "work",
                  "description": "A tap on the playfield: the work's own (a tap-to-walk passes through) or the player's click where it landed. Recorded: a tap reaches the work as the click where it lands under either. Absent: work.",
                  "type": "string",
                  "enum": [
                    "work",
                    "click"
                  ]
                },
                "fixed": {
                  "description": "The layout cannot adapt upright.",
                  "type": "boolean",
                  "const": true
                },
                "omit": {
                  "description": "Keys the work reads with no place on a phone on purpose, each with its reason: own-control (an exact duplicate of the work's own on-screen control or touch, or of the player's Sound) or computer-only (a debug, editor or developer key). Every other key the work reads needs a place. Read by Playspace's tools; the player ignores it.",
                  "maxItems": 24,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                        "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                      },
                      "why": {
                        "type": "string",
                        "enum": [
                          "own-control",
                          "computer-only"
                        ],
                        "description": "own-control: already done at phone size by the work's own on-screen control or its own touch (an exact duplicate), or by the player's own bar (its Sound); computer-only: a convenience only a computer has (a debug, editor or developer key)."
                      }
                    },
                    "required": [
                      "key",
                      "why"
                    ]
                  }
                },
                "parity": {
                  "description": "Set by Playspace when it stores the manifest (since AV239): a move under the work's own touch draws the stick. Leave it out.",
                  "type": "boolean",
                  "const": true
                },
                "final": {
                  "description": "Set by Playspace when it stores the manifest (since AV231): the manifest is final, a key it names in no place gets no button. A manifest stored before it, without this, keeps the earlier rule (each heard key it leaves out is a held button in the left column). A file's own value is replaced when the build is stored.",
                  "type": "boolean"
                }
              },
              "required": [
                "v"
              ],
              "description": "The control manifest, version 2 (AV251): the controller's places by name; read, not written since AV254 (write version 3). Only v is required: a field left out declares nothing there (no places, more empty, look none, text and touch none, tap work). It names what the player draws on a phone (and the hints on a computer show, in the same order), never every key the work reads. Rules a JSON Schema cannot state, each dropping the whole manifest when broken: at most 24 keys in all, a key in one place only (not also in more or omit), a pair's two places both named, and at most 4096 characters as the frame receives it."
            },
            {
              "type": "object",
              "properties": {
                "v": {
                  "type": "number",
                  "const": 3,
                  "description": "The file's version: 3, the Playspace set (this file's shape; `playspace.layout({ v: 3, ... })` is the code's declaration, a different thing)."
                },
                "move": {
                  "description": "The stick on a phone; absent: no stick.",
                  "type": "object",
                  "properties": {
                    "keys": {
                      "type": "array",
                      "prefixItems": [
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        }
                      ],
                      "items": false,
                      "minItems": 4,
                      "maxItems": 4,
                      "description": "The work's own four keys the stick holds (on a computer W A S D and the arrows press them): up, down, left, right."
                    },
                    "alt": {
                      "description": "A second set the work reads beside them; the stick holds both.",
                      "type": "array",
                      "prefixItems": [
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        }
                      ],
                      "items": false,
                      "minItems": 4,
                      "maxItems": 4
                    },
                    "word": {
                      "description": "The stick's word (Move when none).",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8
                    }
                  },
                  "required": [
                    "keys"
                  ],
                  "additionalProperties": false
                },
                "a": {
                  "description": "A, the right thumb's button; absent: no A.",
                  "type": "object",
                  "properties": {
                    "key": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        {
                          "type": "string",
                          "const": "click"
                        }
                      ],
                      "description": "The work's own key A presses (Space on a computer), or click: the left mouse button where the finger aims."
                    },
                    "word": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8,
                      "description": "One word, at most 8 characters: drawn in the button on a phone and under the key on a computer."
                    },
                    "press": {
                      "type": "string",
                      "const": "switch",
                      "description": "A switch: one press holds the key, the next lets it go. Absent: held while the finger is down."
                    }
                  },
                  "required": [
                    "key"
                  ],
                  "additionalProperties": false
                },
                "b": {
                  "description": "B, up from A; absent: no B.",
                  "type": "object",
                  "properties": {
                    "key": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                          "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                        },
                        {
                          "type": "string",
                          "const": "click2"
                        }
                      ],
                      "description": "The work's own key B presses (Shift on a computer), or click2: the right mouse button."
                    },
                    "word": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8,
                      "description": "One word, at most 8 characters: drawn in the button on a phone and under the key on a computer."
                    },
                    "press": {
                      "type": "string",
                      "const": "switch",
                      "description": "A switch: one press holds the key, the next lets it go. Absent: held while the finger is down."
                    }
                  },
                  "required": [
                    "key"
                  ],
                  "additionalProperties": false
                },
                "esc": {
                  "description": "The pill at the top left on a phone; absent: no pill.",
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                      "description": "The work's own menu key (Esc on a computer)."
                    },
                    "word": {
                      "description": "The pill's word, at most 6 characters (Menu when none).",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 6
                    }
                  },
                  "required": [
                    "key"
                  ],
                  "additionalProperties": false
                },
                "pointer": {
                  "description": "What a finger on the work is: mouse (the held mouse, a tap the click; the default), look (a drag turns the view, a tap the click), own (the work's own touch: none of ours on the work), none.",
                  "type": "string",
                  "enum": [
                    "mouse",
                    "look",
                    "own",
                    "none"
                  ]
                },
                "click": {
                  "description": "The word under the mouse on a computer.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 8
                },
                "capture": {
                  "description": "With pointer look, on a computer: a click on the work takes the mouse and its movement turns the view, Esc gives it back (a view from inside: a first-person walk or shooter). Absent: a drag turns the view (a view from outside: an orbit, a map, a model). A phone is the same either way: a drag turns the view. Read only with pointer look.",
                  "type": "boolean",
                  "const": true
                },
                "fixed": {
                  "description": "The layout cannot adapt upright.",
                  "type": "boolean",
                  "const": true
                },
                "extra": {
                  "description": "Each key the work reads that has no control of the set, and why. Read by Playspace's tools; the player never gets it.",
                  "maxItems": 24,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "pattern": "^[A-Z][A-Za-z0-9]{0,23}$",
                        "description": "A KeyboardEvent.code (KeyW, ArrowUp, Space, Digit1, Escape): the player presses exactly this code on the work."
                      },
                      "why": {
                        "type": "string",
                        "enum": [
                          "repeat",
                          "unneeded"
                        ],
                        "description": "repeat: another control or the work's own screen already does it; unneeded: play does not depend on it."
                      }
                    },
                    "required": [
                      "key",
                      "why"
                    ],
                    "additionalProperties": false
                  }
                },
                "autoplay": {
                  "description": "AI plays first (AV311): whether a visitor who does nothing sees the work played by its own policy. Absent: as the build registers (a policy plays once the check passed it).",
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "policy",
                        "off"
                      ],
                      "description": "policy: the build registers an autoplay policy (`playspace.autoplay`), played for a visitor who does nothing once the check passed it; off: never played, whatever the build registers."
                    },
                    "handover": {
                      "description": "fresh: a person's first touch starts the work afresh (a work with a score or a clock); continue: the person carries on from where the policy left it (a toy, a walk). The policy's own `handover` is what plays; this says it for the tools.",
                      "type": "string",
                      "enum": [
                        "fresh",
                        "continue"
                      ]
                    }
                  },
                  "required": [
                    "mode"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "v"
              ],
              "additionalProperties": false,
              "description": "The control manifest, version 3 (AV254): the Playspace set, the same few controls on every work. Only v is required; each of move, a, b and esc is drawn only where named. Rules a JSON Schema cannot state, each dropping the whole manifest when broken: a key in one control only, and not also in extra; at most 4096 characters as the frame receives it."
            }
          ],
          "description": "The control manifest: what the player draws and presses on a phone, and the key hints on a computer in the same order; authored and final, a key it names in no place gets no button (its handler stays). Version 2 (write this one) names the controller's places (LS A B X Y R1 L1 SELECT START R2 L2, the list START opens as `more`, an optional pair); version 1, by role, still reads. Only v is required. The cookbook's section 0.5 says what each place is for. A manifest that does not hold is ignored as a whole and the check's own reading is used. Rules JSON Schema cannot state, each dropping the whole manifest when broken: at most 24 keys in all; in version 2 a key in one place only (not also in more or omit) and a pair's two places both named; in version 1 one action each with the role primary, secondary, action3 and action4; and at most 4096 characters as the frame receives it."
        }
      ]
    },
    "idle": {
      "description": "Seconds without activity, 30 to 600 (rounded; a number outside is clamped), or false. Recorded with the work; nothing on screen changes with it.",
      "anyOf": [
        {
          "type": "number",
          "minimum": 30,
          "maximum": 600
        },
        {
          "type": "boolean",
          "const": false
        }
      ]
    },
    "objective": {
      "description": "The work's aim in one line, at most 160 characters (a longer one is dropped). Kept with the work for the player's menu.",
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "score": {
      "description": "How the work's score reads, for the end card and the scores board.",
      "type": "object",
      "properties": {
        "better": {
          "type": "string",
          "enum": [
            "higher",
            "lower"
          ],
          "description": "Which way a better score goes: with \"lower\", a person's best is their lowest."
        },
        "unit": {
          "description": "The score's unit, at most 32 characters; \"ms\" shows a time in seconds.",
          "type": "string",
          "minLength": 1,
          "maxLength": 32
        }
      },
      "required": [
        "better"
      ]
    },
    "card": {
      "type": "object",
      "properties": {
        "sentence": {
          "description": "One sentence of what a person does with it, at most 140 characters (longer is cut). Prefills the caption on the review page.",
          "type": "string",
          "minLength": 1,
          "maxLength": 140
        },
        "needs": {
          "description": "What it needs to be enjoyed; unknown words are dropped. Prefills the review page.",
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "sound",
              "mouse",
              "keyboard",
              "two-hands",
              "headphones"
            ]
          }
        },
        "sitting": {
          "description": "How long a sitting is: a minute or two, a few minutes, as long as a person likes. Prefills the review page.",
          "type": "string",
          "enum": [
            "short",
            "medium",
            "long"
          ]
        },
        "language": {
          "description": "The language of its words, a BCP 47 tag such as \"en\" or \"pt-BR\".",
          "type": "string",
          "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8}){0,3}$"
        },
        "engine": {
          "description": "The engine it was made with, if any.",
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40,
              "description": "The package's name, at most 40 characters."
            },
            "version": {
              "description": "Its version, at most 24 characters.",
              "type": "string",
              "minLength": 1,
              "maxLength": 24
            }
          },
          "required": [
            "name"
          ]
        },
        "libraries": {
          "description": "The libraries it uses, at most 12 (more are cut), each with its licence where known.",
          "maxItems": 12,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40,
                "description": "The package's name, at most 40 characters."
              },
              "version": {
                "description": "Its version, at most 24 characters.",
                "type": "string",
                "minLength": 1,
                "maxLength": 24
              },
              "licence": {
                "type": "string",
                "enum": [
                  "MIT",
                  "MIT-0",
                  "Apache-2.0",
                  "BSD-2-Clause",
                  "BSD-3-Clause",
                  "ISC",
                  "Zlib",
                  "0BSD",
                  "Unlicense",
                  "CC0-1.0",
                  "WTFPL",
                  "CC-BY-4.0",
                  "CC-BY-3.0",
                  "CC-BY-SA-4.0",
                  "CC-BY-SA-3.0",
                  "CC-BY-NC-4.0",
                  "CC-BY-NC-3.0",
                  "CC-BY-NC-SA-4.0",
                  "CC-BY-NC-SA-3.0",
                  "CC-BY-ND-4.0",
                  "GPL-2.0-only",
                  "GPL-2.0-or-later",
                  "GPL-3.0-only",
                  "GPL-3.0-or-later",
                  "LGPL-2.1-only",
                  "LGPL-2.1-or-later",
                  "LGPL-3.0-only",
                  "LGPL-3.0-or-later",
                  "AGPL-3.0-only",
                  "AGPL-3.0-or-later",
                  "MPL-2.0",
                  "EPL-2.0",
                  "APSL-2.0",
                  "Artistic-2.0",
                  "BSL-1.0",
                  "OFL-1.1",
                  "Unicode-3.0"
                ],
                "description": "An SPDX licence id from the common list; a work under another names none and says it in its credits."
              }
            },
            "required": [
              "name"
            ]
          }
        },
        "credits": {
          "description": "Who made what, at most 600 characters. Prefills the credit on the review page.",
          "type": "string",
          "minLength": 1,
          "maxLength": 600
        },
        "licence": {
          "type": "string",
          "enum": [
            "MIT",
            "MIT-0",
            "Apache-2.0",
            "BSD-2-Clause",
            "BSD-3-Clause",
            "ISC",
            "Zlib",
            "0BSD",
            "Unlicense",
            "CC0-1.0",
            "WTFPL",
            "CC-BY-4.0",
            "CC-BY-3.0",
            "CC-BY-SA-4.0",
            "CC-BY-SA-3.0",
            "CC-BY-NC-4.0",
            "CC-BY-NC-3.0",
            "CC-BY-NC-SA-4.0",
            "CC-BY-NC-SA-3.0",
            "CC-BY-ND-4.0",
            "GPL-2.0-only",
            "GPL-2.0-or-later",
            "GPL-3.0-only",
            "GPL-3.0-or-later",
            "LGPL-2.1-only",
            "LGPL-2.1-or-later",
            "LGPL-3.0-only",
            "LGPL-3.0-or-later",
            "AGPL-3.0-only",
            "AGPL-3.0-or-later",
            "MPL-2.0",
            "EPL-2.0",
            "APSL-2.0",
            "Artistic-2.0",
            "BSL-1.0",
            "OFL-1.1",
            "Unicode-3.0"
          ],
          "description": "An SPDX licence id from the common list; a work under another names none and says it in its credits."
        }
      },
      "additionalProperties": {},
      "description": "The work's card: offered on the review page as the creator's own, to keep or change before publishing. Nothing ranks, filters or recommends on it. A field outside its shape is dropped."
    }
  },
  "additionalProperties": {},
  "description": "playspace.json at the build's root (a source's public/playspace.json), read when the work is published. At most 16384 bytes; a file over it, not JSON or not an object is read as no file. Every field is optional, a field outside its shape is ignored, and fields not listed here are ignored."
}
