{
  "format": 2,
  "firmware": {
    "stock": "V4.094",
    "medius": "3.4.6"
  },
  "rig": "A Linux PC, each box fed by a USB device emulator on its USB3, both boxes behind one USB hub and tested one at a time",
  "layers": {
    "wire": "USB packets on the PC's bus, timed by the kernel's usbmon",
    "evdev": "Input events, timed by the kernel as the HID driver handles each report",
    "hidraw": "Each report byte for byte, timed when the reading program wakes",
    "host": "The PC's clock, read by the test program when it writes a command, or when the clone connects or disconnects",
    "emulator": "When the emulator queued each native report, on its clock, mapped to the bus clock to within ±95 µs by its control link's packets (usbmon)"
  },
  "categories": [
    {
      "id": "features",
      "title": "Features",
      "sections": [
        {
          "id": "feat-motion",
          "title": "Motion",
          "about": "Moves, the wheel and horizontal scroll, and how each box smooths them.",
          "tables": [
            {
              "kind": "feature",
              "label": "Moves",
              "key": "Capability",
              "rows": [
                {
                  "id": "feat-move-relative",
                  "label": "Relative move",
                  "stock": "km.move",
                  "medius": "MOVE"
                },
                {
                  "id": "feat-move-immediate",
                  "label": "Immediate move",
                  "stock": "km.move_now",
                  "medius": "MOVE(NOW)"
                },
                {
                  "id": "feat-move-receipt",
                  "label": "Move with a receipt",
                  "stock": "RAW_MOVE",
                  "medius": null
                },
                {
                  "id": "feat-move-pending",
                  "label": "Query for pending motion",
                  "stock": "km.moving",
                  "medius": null
                },
                {
                  "id": "feat-move-flush",
                  "label": "Flush held motion",
                  "stock": null,
                  "medius": "MOVE(FLUSH)"
                },
                {
                  "id": "feat-move-discard",
                  "label": "Discard held motion",
                  "stock": null,
                  "medius": "MOVE(DISCARD)"
                },
                {
                  "id": "feat-move-absolute",
                  "label": "Absolute move on a virtual screen",
                  "stock": "km.moveto",
                  "medius": null
                },
                {
                  "id": "feat-move-position",
                  "label": "Tracked pointer position",
                  "stock": "km.getpos",
                  "medius": null
                },
                {
                  "id": "feat-move-click-back",
                  "label": "Move, click and move back",
                  "stock": "km.silent",
                  "medius": "CLIP_APPEND"
                },
                {
                  "id": "feat-move-wheel",
                  "label": "Wheel",
                  "stock": "km.wheel",
                  "medius": "MOVE"
                },
                {
                  "id": "feat-move-pan",
                  "label": "Horizontal scroll (AC Pan)",
                  "stock": null,
                  "medius": "MOVE"
                }
              ]
            },
            {
              "kind": "feature",
              "label": "Smoothing",
              "key": "Capability",
              "rows": [
                {
                  "id": "feat-spread-command-rate",
                  "label": "Spread over the command interval",
                  "stock": "INTERPOLATE",
                  "medius": "OPTION(SPREAD)"
                },
                {
                  "id": "feat-spread-set-time",
                  "label": "Spread over a set time",
                  "stock": "INTERPOLATE",
                  "medius": null
                },
                {
                  "id": "feat-render-model",
                  "label": "Render through a mouse model",
                  "stock": null,
                  "medius": "OPTION(RENDER)"
                },
                {
                  "id": "feat-render-native",
                  "label": "Render native motion",
                  "stock": null,
                  "medius": "OPTION(RENDER)"
                },
                {
                  "id": "feat-ride-native",
                  "label": "Carry injected motion only in native reports",
                  "stock": null,
                  "medius": "OPTION(MOVE_RIDE)"
                }
              ]
            }
          ]
        },
        {
          "id": "feat-buttons",
          "title": "Mouse buttons",
          "about": "Stock has a command for each of five buttons. Medius's INJECT covers every button the mouse has, up to 16.",
          "tables": [
            {
              "kind": "feature",
              "label": "Press and release",
              "key": "Button",
              "rows": [
                {
                  "id": "feat-press-left",
                  "label": "Left",
                  "stock": "km.left",
                  "medius": "INJECT"
                },
                {
                  "id": "feat-press-right",
                  "label": "Right",
                  "stock": "km.right",
                  "medius": "INJECT"
                },
                {
                  "id": "feat-press-middle",
                  "label": "Middle",
                  "stock": "km.middle",
                  "medius": "INJECT"
                },
                {
                  "id": "feat-press-side1",
                  "label": "Side 1",
                  "stock": "km.side1",
                  "medius": "INJECT"
                },
                {
                  "id": "feat-press-side2",
                  "label": "Side 2",
                  "stock": "km.side2",
                  "medius": "INJECT"
                },
                {
                  "id": "feat-press-6-16",
                  "label": "Buttons 6-16",
                  "stock": null,
                  "medius": "INJECT"
                }
              ]
            },
            {
              "kind": "feature",
              "label": "Clicks and queries",
              "key": "Capability",
              "rows": [
                {
                  "id": "feat-click-timed",
                  "label": "Clicks timed by the box",
                  "stock": "km.click",
                  "medius": "CLIP_APPEND"
                },
                {
                  "id": "feat-query-physical-buttons",
                  "label": "Query native buttons",
                  "stock": "PHYS_BUTTONS",
                  "medius": null
                }
              ]
            }
          ]
        },
        {
          "id": "feat-keys",
          "title": "Keys and media keys",
          "about": "Keyboard keys, and media keys such as volume and play.",
          "tables": [
            {
              "kind": "feature",
              "key": "Capability",
              "rows": [
                {
                  "id": "feat-key-down",
                  "label": "Key down",
                  "stock": "km.down",
                  "medius": "INJECT"
                },
                {
                  "id": "feat-key-up",
                  "label": "Key up",
                  "stock": "km.up",
                  "medius": "INJECT"
                },
                {
                  "id": "feat-key-press-timed",
                  "label": "Key press timed by the box",
                  "stock": "km.press",
                  "medius": "CLIP_APPEND"
                },
                {
                  "id": "feat-key-multi-down",
                  "label": "Several keys down in one command",
                  "stock": "km.multidown",
                  "medius": null
                },
                {
                  "id": "feat-key-multi-up",
                  "label": "Several keys up in one command",
                  "stock": "km.multiup",
                  "medius": null
                },
                {
                  "id": "feat-key-multi-press",
                  "label": "Several keys pressed in one command",
                  "stock": "km.multipress",
                  "medius": null
                },
                {
                  "id": "feat-key-string",
                  "label": "String typed by the box",
                  "stock": "km.string",
                  "medius": "CLIP_APPEND"
                },
                {
                  "id": "feat-key-release-all",
                  "label": "Release every injected key",
                  "stock": "km.init",
                  "medius": "RESET"
                },
                {
                  "id": "feat-key-query",
                  "label": "Query a key's state",
                  "stock": "km.isdown",
                  "medius": null
                },
                {
                  "id": "feat-key-media",
                  "label": "Media key down and up",
                  "stock": null,
                  "medius": "INJECT"
                }
              ],
              "label": "Key commands"
            }
          ]
        },
        {
          "id": "feat-locks",
          "title": "Locks, scaling and remaps",
          "about": "On both boxes a lock or a scale acts on native input and leaves injected input alone.",
          "tables": [
            {
              "kind": "feature",
              "label": "Button locks",
              "key": "Button",
              "rows": [
                {
                  "id": "feat-block-left",
                  "label": "Left",
                  "stock": "km.left_mask",
                  "medius": "LOCK"
                },
                {
                  "id": "feat-block-right",
                  "label": "Right",
                  "stock": "km.right_mask",
                  "medius": "LOCK"
                },
                {
                  "id": "feat-block-middle",
                  "label": "Middle",
                  "stock": "km.middle_mask",
                  "medius": "LOCK"
                },
                {
                  "id": "feat-block-side1",
                  "label": "Side 1",
                  "stock": "km.side1_mask",
                  "medius": "LOCK"
                },
                {
                  "id": "feat-block-side2",
                  "label": "Side 2",
                  "stock": "km.side2_mask",
                  "medius": "LOCK"
                },
                {
                  "id": "feat-block-6-16",
                  "label": "Buttons 6-16",
                  "stock": null,
                  "medius": "LOCK"
                }
              ]
            },
            {
              "kind": "feature",
              "label": "Other locks",
              "key": "Capability",
              "rows": [
                {
                  "id": "feat-block-motion",
                  "label": "Block cursor motion per direction",
                  "stock": "km.move_mask",
                  "medius": "LOCK"
                },
                {
                  "id": "feat-block-wheel",
                  "label": "Block the wheel per direction",
                  "stock": "km.wheel_mask",
                  "medius": "LOCK"
                },
                {
                  "id": "feat-block-pan",
                  "label": "Block horizontal scroll",
                  "stock": null,
                  "medius": "LOCK"
                },
                {
                  "id": "feat-block-key",
                  "label": "Block a key",
                  "stock": "km.mask",
                  "medius": "LOCK"
                },
                {
                  "id": "feat-block-media",
                  "label": "Block a media key",
                  "stock": null,
                  "medius": "LOCK"
                },
                {
                  "id": "feat-block-all-keys",
                  "label": "Block every key in one command",
                  "stock": null,
                  "medius": "LOCK"
                },
                {
                  "id": "feat-block-one-edge",
                  "label": "Block only the press or only the release",
                  "stock": null,
                  "medius": "LOCK"
                },
                {
                  "id": "feat-lock-query",
                  "label": "Query active locks",
                  "stock": "INJECT_SNAPSHOT",
                  "medius": "QUERY(LOCKS)"
                }
              ]
            },
            {
              "kind": "feature",
              "label": "Motion scaling",
              "key": "Capability",
              "rows": [
                {
                  "id": "feat-scale-motion",
                  "label": "Scale motion, 0-255%",
                  "stock": null,
                  "medius": "LOCK"
                },
                {
                  "id": "feat-scale-reverse",
                  "label": "Reverse motion",
                  "stock": null,
                  "medius": "LOCK"
                },
                {
                  "id": "feat-scale-bearing",
                  "label": "Scale motion with or against the injected direction",
                  "stock": null,
                  "medius": "LOCK"
                },
                {
                  "id": "feat-scale-vector",
                  "label": "Scale only motion along the injected direction",
                  "stock": null,
                  "medius": "OPTION(BEARING)"
                }
              ]
            },
            {
              "kind": "feature",
              "label": "Remaps",
              "key": "Capability",
              "rows": [
                {
                  "id": "feat-remap-key-key",
                  "label": "Key to key",
                  "stock": "km.remap",
                  "medius": null
                },
                {
                  "id": "feat-remap-button-button",
                  "label": "Button to button",
                  "stock": null,
                  "medius": "TRANSFORM"
                },
                {
                  "id": "feat-remap-button-key",
                  "label": "Button to key",
                  "stock": null,
                  "medius": "TRANSFORM"
                },
                {
                  "id": "feat-remap-button-media",
                  "label": "Button to media key",
                  "stock": null,
                  "medius": "TRANSFORM"
                },
                {
                  "id": "feat-remap-axis-axis",
                  "label": "Axis to axis",
                  "stock": null,
                  "medius": "TRANSFORM"
                },
                {
                  "id": "feat-remap-swap-axes",
                  "label": "Swap two axes",
                  "stock": null,
                  "medius": "TRANSFORM"
                },
                {
                  "id": "feat-remap-query",
                  "label": "Query active remaps",
                  "stock": null,
                  "medius": "QUERY(TRANSFORMS)"
                }
              ]
            }
          ]
        },
        {
          "id": "feat-pads",
          "title": "Game pads",
          "about": "Stock's commands for game pads. Medius relays a pad and has no command for one.",
          "tables": [
            {
              "kind": "feature",
              "label": "Pad commands",
              "key": "Capability",
              "rows": [
                {
                  "id": "feat-pad-read",
                  "label": "Read the pad's state",
                  "stock": "km.controller_physical",
                  "medius": null
                },
                {
                  "id": "feat-pad-stream",
                  "label": "Stream pad changes",
                  "stock": "km.controller",
                  "medius": null
                },
                {
                  "id": "feat-pad-drive",
                  "label": "Drive the pad state the PC gets",
                  "stock": "km.controller_state",
                  "medius": null
                },
                {
                  "id": "feat-pad-mask",
                  "label": "Block a pad control",
                  "stock": "km.controller_mask",
                  "medius": null
                },
                {
                  "id": "feat-pad-kind",
                  "label": "Recognise the pad's kind",
                  "stock": "DEVICE",
                  "medius": null
                },
                {
                  "id": "feat-pad-curves",
                  "label": "Pad response curves and deadzones",
                  "stock": "CONNECTION",
                  "medius": null
                },
                {
                  "id": "feat-pad-translation",
                  "label": "Mouse and keyboard as a pad",
                  "stock": "CONNECTION",
                  "medius": null
                },
                {
                  "id": "feat-pad-presets",
                  "label": "Saved pad presets",
                  "stock": "CONNECTION",
                  "medius": null
                }
              ]
            },
            {
              "kind": "feature",
              "label": "Pads driven",
              "key": "Pad",
              "rows": [
                {
                  "id": "feat-pad-hid",
                  "label": "HID pad",
                  "stock": "km.controller_state",
                  "medius": null
                },
                {
                  "id": "feat-pad-ds4",
                  "label": "DualShock 4",
                  "stock": "km.controller_state",
                  "medius": null
                },
                {
                  "id": "feat-pad-dualsense",
                  "label": "DualSense",
                  "stock": "km.controller_state",
                  "medius": null
                },
                {
                  "id": "feat-pad-dualsense-edge",
                  "label": "DualSense Edge",
                  "stock": "km.controller_state",
                  "medius": null
                },
                {
                  "id": "feat-pad-gip",
                  "label": "Xbox One and Series (GIP)",
                  "stock": "km.controller_state",
                  "medius": null
                },
                {
                  "id": "feat-pad-xinput",
                  "label": "Xbox 360 (XInput)",
                  "stock": "km.controller_state",
                  "medius": null
                }
              ]
            }
          ]
        },
        {
          "id": "feat-observe",
          "title": "Input and traffic capture",
          "about": "Watching native input and USB traffic from the control port.",
          "tables": [
            {
              "kind": "feature",
              "key": "Capability",
              "rows": [
                {
                  "id": "feat-obs-buttons",
                  "label": "Stream native button changes",
                  "stock": "km.buttons",
                  "medius": "CATCH(BTN)"
                },
                {
                  "id": "feat-obs-keys",
                  "label": "Stream native key changes",
                  "stock": "km.keys",
                  "medius": "CATCH(KEY)"
                },
                {
                  "id": "feat-obs-media",
                  "label": "Stream native media key changes",
                  "stock": null,
                  "medius": "CATCH(MEDIA)"
                },
                {
                  "id": "feat-obs-motion",
                  "label": "Stream native motion",
                  "stock": null,
                  "medius": "CATCH(AXIS)"
                },
                {
                  "id": "feat-obs-hid-in",
                  "label": "Capture native HID reports",
                  "stock": "RAW_PASSTHROUGH",
                  "medius": "CATCH(HID_IN)"
                },
                {
                  "id": "feat-obs-hid-out",
                  "label": "Capture HID OUT reports",
                  "stock": null,
                  "medius": "CATCH(HID_OUT)"
                },
                {
                  "id": "feat-obs-vendor-intr",
                  "label": "Capture vendor interrupt traffic",
                  "stock": null,
                  "medius": "CATCH(VEND_INTR)"
                },
                {
                  "id": "feat-obs-vendor-bulk",
                  "label": "Capture vendor bulk traffic",
                  "stock": null,
                  "medius": "CATCH(VEND_BULK)"
                },
                {
                  "id": "feat-obs-control",
                  "label": "Capture control transfers",
                  "stock": null,
                  "medius": "CATCH(CONTROL)"
                },
                {
                  "id": "feat-obs-emit",
                  "label": "Capture reports the clone emits",
                  "stock": null,
                  "medius": "CATCH(EMIT)"
                },
                {
                  "id": "feat-obs-bus",
                  "label": "Watch bus events",
                  "stock": null,
                  "medius": "CATCH(BUS)"
                }
              ],
              "label": "Capture commands"
            }
          ]
        },
        {
          "id": "feat-device",
          "title": "Device control",
          "about": "Commands that act on the real device or its traffic. Medius's commands here need imperfect clones on.",
          "tables": [
            {
              "kind": "feature",
              "key": "Capability",
              "rows": [
                {
                  "id": "feat-dev-transfer",
                  "label": "Control transfer to the real device",
                  "stock": null,
                  "medius": "TRANSFER"
                },
                {
                  "id": "feat-dev-raw-pc",
                  "label": "Raw report to the PC",
                  "stock": null,
                  "medius": "RAW"
                },
                {
                  "id": "feat-dev-raw-device",
                  "label": "Raw packet to the real device",
                  "stock": null,
                  "medius": "RAW"
                },
                {
                  "id": "feat-dev-rewrite",
                  "label": "Rewrite packets in flight",
                  "stock": null,
                  "medius": "REWRITE"
                },
                {
                  "id": "feat-dev-drop",
                  "label": "Drop packets in flight",
                  "stock": null,
                  "medius": "REWRITE"
                },
                {
                  "id": "feat-dev-answer",
                  "label": "Reply to control requests from the box",
                  "stock": null,
                  "medius": "REWRITE"
                },
                {
                  "id": "feat-dev-patch",
                  "label": "Patch the descriptors the PC reads",
                  "stock": null,
                  "medius": "PATCH"
                }
              ],
              "label": "Device commands"
            }
          ]
        },
        {
          "id": "feat-clips",
          "title": "Clips",
          "about": "A clip is a set of moves, clicks and keys stored on the box and timed by the box.",
          "tables": [
            {
              "kind": "feature",
              "key": "Capability",
              "rows": [
                {
                  "id": "feat-clip-load",
                  "label": "Load onto the box",
                  "stock": null,
                  "medius": "CLIP_APPEND"
                },
                {
                  "id": "feat-clip-play",
                  "label": "Play, pause and stop",
                  "stock": null,
                  "medius": "CLIP_CTRL"
                },
                {
                  "id": "feat-clip-loop",
                  "label": "Loop",
                  "stock": null,
                  "medius": "CLIP_SET"
                },
                {
                  "id": "feat-clip-retain",
                  "label": "Keep to replay",
                  "stock": null,
                  "medius": "CLIP_SET"
                },
                {
                  "id": "feat-clip-autolock",
                  "label": "Lock native input while playing",
                  "stock": null,
                  "medius": "CLIP_SET"
                },
                {
                  "id": "feat-clip-trigger-input",
                  "label": "Start on a button, key or media key",
                  "stock": null,
                  "medius": "CLIP_TRIGGER"
                },
                {
                  "id": "feat-clip-trigger-packet",
                  "label": "Start on a matched packet",
                  "stock": null,
                  "medius": "CLIP_TRIGGER"
                }
              ],
              "label": "Clip commands"
            }
          ]
        },
        {
          "id": "feat-box",
          "title": "Box queries and settings",
          "about": "Queries about the box and the real device, and the box's settings.",
          "tables": [
            {
              "kind": "feature",
              "label": "Queries",
              "key": "Capability",
              "rows": [
                {
                  "id": "feat-box-version",
                  "label": "Firmware version number",
                  "stock": "FIRMWARE_VERSION",
                  "medius": "QUERY(VERSION)"
                },
                {
                  "id": "feat-box-device-kind",
                  "label": "Real device's kind",
                  "stock": "DEVICE",
                  "medius": "QUERY(DEVICE_INFO)"
                },
                {
                  "id": "feat-box-device-id",
                  "label": "Real device's VID and PID",
                  "stock": null,
                  "medius": "QUERY(DEVICE_INFO)"
                },
                {
                  "id": "feat-box-report-period",
                  "label": "Native report rate",
                  "stock": "km.device",
                  "medius": "QUERY(RATE)"
                },
                {
                  "id": "feat-box-device-inputs",
                  "label": "Inputs the real device declares",
                  "stock": null,
                  "medius": "QUERY(CAPS)"
                },
                {
                  "id": "feat-box-injected-state",
                  "label": "Injected state snapshot",
                  "stock": "INJECT_SNAPSHOT",
                  "medius": null
                },
                {
                  "id": "feat-box-health",
                  "label": "Health flags",
                  "stock": null,
                  "medius": "QUERY(HEALTH)"
                },
                {
                  "id": "feat-box-counters",
                  "label": "Drop and reset counters",
                  "stock": null,
                  "medius": "QUERY(STATS)"
                },
                {
                  "id": "feat-box-log",
                  "label": "Diagnostic log",
                  "stock": null,
                  "medius": "LOG"
                }
              ]
            },
            {
              "kind": "feature",
              "label": "Settings",
              "key": "Capability",
              "rows": [
                {
                  "id": "feat-box-emit-pace",
                  "label": "Emit rate",
                  "stock": null,
                  "medius": "OPTION(EMIT)"
                },
                {
                  "id": "feat-box-force-interval",
                  "label": "Forced poll rate",
                  "stock": null,
                  "medius": "OPTION(EMIT)",
                  "note": "With imperfect clones on"
                },
                {
                  "id": "feat-box-name",
                  "label": "Box name",
                  "stock": null,
                  "medius": "OPTION(NAME)"
                },
                {
                  "id": "feat-box-led",
                  "label": "Status LED",
                  "stock": null,
                  "medius": "LED"
                },
                {
                  "id": "feat-box-reboot",
                  "label": "Reboot",
                  "stock": null,
                  "medius": "REBOOT"
                },
                {
                  "id": "feat-box-passthrough",
                  "label": "Return to passthrough",
                  "stock": null,
                  "medius": "RESET"
                },
                {
                  "id": "feat-box-erase",
                  "label": "Erase stored settings",
                  "stock": null,
                  "medius": "RESET(NVS)"
                },
                {
                  "id": "feat-box-baud",
                  "label": "Baud rate",
                  "stock": "km.baud",
                  "medius": null
                },
                {
                  "id": "feat-box-echo",
                  "label": "Command echo",
                  "stock": "km.echo",
                  "medius": null
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "defects": [],
  "pending": []
}
