{
  "slug": "browser-game-input-check",
  "skill": "browser-game-input-check",
  "upstream": "GameSkill original (onsite/<slug>/original)",
  "sourceHash": "3561bba53b92e2fa5ed3255825f42ce436f3ccac4591de530f95b0985a13f868",
  "date": "2026-11-09",
  "engine": "Headless Chrome (DevTools protocol) + Node 22",
  "env": [
    "Node v22.23.4",
    "Node 22 built-in WebSocket and http, no npm packages",
    "Google Chrome headless=new, driven over the DevTools protocol (Input.dispatchKeyEvent, Runtime.evaluate, Page.captureScreenshot)"
  ],
  "trigger": "static",
  "passed": 30,
  "total": 30,
  "commands": [
    "(cd ../original && node test/run_tests.mjs)",
    "(cd . && node ../original/tools/input_check.mjs ../original/example/lantern-moth/index.html --shot screenshot.png)"
  ],
  "checks": [
    {
      "criterion": "trigger",
      "name": "SKILL.md description says when to use it",
      "pass": true,
      "detail": "Make keyboard controls in a browser game behave and prove it - a drop-in input.js (physical keys by event.code, no repea"
    },
    {
      "criterion": "trigger",
      "name": "triggers on: \"Arrow keys scroll the page in my canvas browser game and keys get stuck after alt-tab, fix the keyboard input\"",
      "pass": true,
      "detail": "rank 1/129, overlap 12"
    },
    {
      "criterion": "trigger",
      "name": "triggers on: \"WASD does not work on AZERTY keyboards in my HTML5 game, and the jump fires twice sometimes\"",
      "pass": true,
      "detail": "rank 1/129, overlap 7"
    },
    {
      "criterion": "trigger",
      "name": "triggers on: \"Check the keyboard controls of my web game in headless Chrome\"",
      "pass": true,
      "detail": "rank 1/129, overlap 5"
    },
    {
      "criterion": "trigger",
      "name": "does not trigger on: \"Add rumble to my Unity gamepad controller\"",
      "pass": true,
      "detail": "rank 21/129, overlap 0"
    },
    {
      "criterion": "trigger",
      "name": "does not trigger on: \"Compose background music for a boss fight\"",
      "pass": true,
      "detail": "rank 10/129, overlap 0"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: input.js",
      "pass": true,
      "detail": "ArrowLeft press is pressed + held, default prevented"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: input.js",
      "pass": true,
      "detail": "pressed lasts one update, held stays"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: input.js",
      "pass": true,
      "detail": "OS repeat does not press again"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: input.js",
      "pass": true,
      "detail": "keyup gives released, not held"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: input.js",
      "pass": true,
      "detail": "a tap inside one frame is still pressed once"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: input.js",
      "pass": true,
      "detail": "two keys on one action, one released -> still held"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: input.js",
      "pass": true,
      "detail": "both released -> not held"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: input.js",
      "pass": true,
      "detail": "unbound F5 is not blocked"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: input.js",
      "pass": true,
      "detail": "Ctrl+W is left to the browser"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: input.js",
      "pass": true,
      "detail": "window blur releases everything"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: input.js",
      "pass": true,
      "detail": "keys typed in an <input> are ignored"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: Lantern Moth with input.js",
      "pass": true,
      "detail": "checker 15/15, exit 0 - exit 0, 15/15"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: broken copy (naive-input.js, update once per display frame)",
      "pass": true,
      "detail": "exactly the 8 expected FAILs - exit 1, 8 FAIL"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: every FAIL comes with a fix line",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: a game without the probe",
      "pass": true,
      "detail": "page checks still run (no scroll PASS), only the probe FAILs - game exposes window.__gameInput.debug()"
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: a page that throws fails \"no JavaScript errors\"",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: a missing file exits 2 - exit 2",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "input.js unit tests, Lantern Moth 15/15, the broken copy fails exactly 8 checks, pages without probe / with an error / missing: exits 0 with no script errors",
      "pass": true,
      "detail": "exit 0"
    },
    {
      "criterion": "output",
      "name": "screenshot screenshot.png rendered",
      "pass": true
    },
    {
      "criterion": "output",
      "name": "self-check list has at least 3 items",
      "pass": true,
      "detail": "4 items"
    },
    {
      "criterion": "single",
      "name": "one job per skill (reviewed)",
      "pass": true,
      "detail": "One job: keyboard input in browser games - a module that handles it correctly and a checker that proves it in Chrome. Gamepad, touch and remapping UI are out of scope."
    },
    {
      "criterion": "bilingual",
      "name": "English SKILL.md",
      "pass": true
    },
    {
      "criterion": "bilingual",
      "name": "Chinese SKILL.zh.md shipped next to SKILL.md",
      "pass": true,
      "detail": "2719 chars"
    },
    {
      "criterion": "bilingual",
      "name": "Chinese guide written",
      "pass": true,
      "detail": "1161 chars"
    }
  ]
}
