{
 "title": "Otterchip typing keyboard: donor selection, component model and fit study",
 "schema": "otterchip-research-typing/1",
 "date": "2026-11-05",
 "status": "Provisional recommendation pending the owner's donor choice. No purchase, no bench measurement; not fabrication CAD.",
 "recommendation": {
  "assembly": "YMDK DK61-64 wired hot-swap PCB, variant \"2u Shift 64 ANSI ISO\" + YMDK 60% aluminium Plate A (2u Lshift) + PCB screw-in stabilisers (1 x 6.25u, 3 x 2u) + 64 MX-style switches + MX keycaps",
  "items": [
   {
    "part": "PCB",
    "sku": "YMDK-shopify-5270",
    "variant": "2u Shift 64 ANSI ISO",
    "price_usd": 38.5,
    "available": true,
    "url": "https://ymdkey.com/products/ymdk-dk61-64-gh60-wired-hot-swappable-60-pcb-support-iso-ansi-fully-programmable-via-vial"
   },
   {
    "part": "Plate",
    "sku": "YMDK-shopify-0100 (alu gray) / 0101 (silver) / 0099 (black)",
    "variant": "Plate A 2u shift",
    "price_usd": 18.9,
    "available": true,
    "url": "https://ymdkey.com/products/60-aluminum-brass-steel-plate-for-dz60-gh60-xd64-yd64mq"
   },
   {
    "part": "Stabilisers",
    "sku": "any PCB screw-in set 1x6.25u + 3x2u (e.g. YMDK universal plate \"+ full stabilizers\" variants)",
    "price_usd": null,
    "available": null,
    "url": null
   },
   {
    "part": "Switches/keycaps",
    "sku": "owner choice (MX 3/5-pin, non-optical)",
    "price_usd": null,
    "available": null,
    "url": null
   }
  ],
  "why": [
   "Exact GK64 key arrangement (2u Lshift, 1u Rshift, inverted-T arrows, 6.25u space): 64 keys, all MX, all standard keycap sizes -> broad individually coloured keycap choice.",
   "VIA/VIAL (QMK-family) firmware - remap from a browser; plain USB HID for the ESP32-P4 or Pi host; no proprietary driver, no RGB current, no microphone.",
   "GH60 standard outline and tray-mount holes confirmed by photogrammetry (63 switch positions, RMS 0.13 mm; holes 0.4-1.3 mm).",
   "Hot-swap (Kailh MX) - switches replaceable by a parent without soldering; plate/PCB both in stock at YMDK on 2026-11-05 (~$57 + stabs before shipping)."
  ],
  "cautions": [
   "Plate A compatibility with DK61-64 is inferred (same vendor GH60 ecosystem; plate needs PCB-mount stabs, DK61-64 has stab holes); the DK listing itself links the universal brushed plate.",
   "DK61-64 H4 slot measured ~1.3 mm left of GH60 nominal in one photo: use slot-tolerant standoffs or drill after test fit.",
   "No mechanical drawing from YMDK; dimensions rely on GH60 CAD + photos."
  ]
 },
 "alternatives": [
  {
   "name": "YMDK GK64x wired PCB + FR4 plate + plate stabs (single SKU)",
   "sku": "YMDK-shopify-1499",
   "price_usd": 65.9,
   "available": true,
   "evidence": "GK64XS PCB photo fit (39 pts, RMS 0.30 mm) - holes within 0.04-0.46 mm of GH60; FR4 plate fit 53 pts RMS 0.105 mm, 2u-shift row confirmed",
   "tradeoffs": "Same layout and outline; 3 plate-to-PCB screws documented; proprietary GK6X Windows/macOS driver for remapping; per-key RGB (power); built-in microphone under the space bar; plate-mount stabs only."
  },
  {
   "name": "Keychron K7 Max (low-profile 65%, 68 keys)",
   "sku": "K7M-A1...H3",
   "price_usd": 89.99,
   "available": false,
   "evidence": "Manufacturer STEP/DWG/PDF index; 306 x 97.5 mm",
   "tradeoffs": "Not available on keychron.com 2026-11-05; proprietary low-profile LSA caps only (no rich MX keycap ecosystem); battery; licence restricts redistribution of derived CAD. Kept as a documented low-profile reference only."
  },
  {
   "name": "KBDfans DZ60RGB V2",
   "sku": "PCB0027",
   "price_usd": 55.0,
   "available": false,
   "evidence": "Listing: 63-key layout only",
   "tradeoffs": "Out of stock; different arrow arrangement."
  }
 ],
 "sources": [
  {
   "id": "ymdk-dk6164",
   "url": "https://ymdkey.com/products/ymdk-dk61-64-gh60-wired-hot-swappable-60-pcb-support-iso-ansi-fully-programmable-via-vial",
   "accessed": "2026-11-05",
   "kind": "vendor listing (manufacturer/seller)",
   "used_for": "Recommended PCB: variants, price, availability, VIA/VIAL, STM MCU, Kailh sockets; layout images; PCB photos used for photogrammetry",
   "local_copy": "downloads/shopify/ymdkey_products_*.json, downloads/img_ymdk_dk6164/"
  },
  {
   "id": "ymdk-plate60",
   "url": "https://ymdkey.com/products/60-aluminum-brass-steel-plate-for-dz60-gh60-xd64-yd64mq",
   "accessed": "2026-11-05",
   "kind": "vendor listing",
   "used_for": "Plate A (2u shift) variants/SKUs, layout-support chart, \"PCB-stab PCBs only\" note; oblique photos fitted",
   "local_copy": "downloads/img_ymdk_plate60/"
  },
  {
   "id": "ymdk-universal-plate",
   "url": "https://ymdkey.com/products/gh60-60-universal-brush-aluminum-positioning-plate",
   "accessed": "2026-11-05",
   "kind": "vendor listing",
   "used_for": "Plate linked from the DK61-64 listing (alternative plate); layout-support image",
   "local_copy": "downloads/img_ymdk_plate/"
  },
  {
   "id": "ymdk-gk64x",
   "url": "https://ymdkey.com/products/gk61-gk64-gk61xs-gk64xs-rgb-hot-swap-pcb-plate-independent-driver-bluetooth-or-wired",
   "accessed": "2026-11-05",
   "kind": "vendor listing",
   "used_for": "Alternative PCB+plate+stab SKU, 3 plate screws, GK6X driver, RGB, microphone; GK64XS/plate photos fitted",
   "local_copy": "downloads/img_ymdk_gk64x/"
  },
  {
   "id": "ymdk-gk64-brass",
   "url": "https://ymdkey.com/products/gk64-brass-plate-gh60-xd64-dz60-gk64-gk64x-gk64xs-plate-mounted",
   "accessed": "2026-11-05",
   "kind": "vendor listing",
   "used_for": "GK64 = \"standard 2u shift 64 layout\"; stab set 1x6.25u + 3x2u; GK64 PCBs need plate-mount stabs"
  },
  {
   "id": "ymdk-gh60-cases",
   "url": "https://ymdkey.com/products/gh60-aluminum-case-60-poker2-pok3r-faceu-60-yd60mq-qmk-pcb-gk61-gk64",
   "accessed": "2026-11-05",
   "kind": "vendor listing",
   "used_for": "GH60 case 303 x 104 x 14 mm; acrylic 300 x 103 x 13 (envelope sanity check)"
  },
  {
   "id": "gh60-kicad",
   "url": "https://github.com/komar007/gh60 (keyboard.kicad_pcb @ e7948cf, 2019-07-02)",
   "accessed": "2026-11-05",
   "kind": "open-source PCB CAD (board carries CC and OSHW logos; licence text not verified)",
   "used_for": "Outline 285.0 x 94.6 R2, mount holes, stab footprints, USB J1 x=18.2, key grid origin",
   "local_copy": "downloads/gh60_komar/keyboard.kicad_pcb"
  },
  {
   "id": "qmk-60-ansi-arrow",
   "url": "https://github.com/qmk/qmk_firmware/blob/master/layouts/default/60_ansi_arrow/info.json",
   "accessed": "2026-11-05",
   "kind": "open-source layout data",
   "used_for": "Unit grid 15 x 5; note QMK 60_ansi_arrow is a 63-key 2.25u-shift variant, not GK64",
   "local_copy": "downloads/qmk_layout/60_ansi_arrow_info.json"
  },
  {
   "id": "cherry-mx1a",
   "url": "https://www.maltron.com/uploads/6/1/2/5/61250099/mx1a_11nn_data_sheet.pdf",
   "accessed": "2026-11-05",
   "kind": "manufacturer datasheet (Cherry Corp. 2007 copy)",
   "used_for": "Stack: 5.0 plate-to-PCB, 11.6 housing, 3.6 stem, 3.30 pins, plate 0.06+/-0.006 in, cut-out 0.551 in, 2u stab A=0.94 in, travel 0.16 in",
   "local_copy": "downloads/datasheets/cherry_mx1a_11nn_maltron.pdf"
  },
  {
   "id": "cherry-mx2a",
   "url": "https://cdn.sparkfun.com/assets/6/b/7/9/b/MX2A_BROWN-Datasheet-EN_US.pdf",
   "accessed": "2026-11-05",
   "kind": "manufacturer datasheet (Cherry Europe, via SparkFun)",
   "used_for": "Travel 4 / pre-travel 2, total height 18.5, 15.63 mm body",
   "local_copy": "downloads/datasheets/cherry_mx2a_brown_sparkfun.pdf"
  },
  {
   "id": "keychron-profiles",
   "url": "https://github.com/Keychron/Keychron-Keyboards-Hardware-Design/tree/main/Keycap%20Profiles",
   "accessed": "2026-11-05",
   "kind": "manufacturer documentation (source-available)",
   "used_for": "Approximate profile heights: Cherry ~9.4, OEM ~11.9, OSA ~11, MDA ~7.45, DSA ~7.5, SA/KSA ~16.5, LSA ~4.4"
  },
  {
   "id": "keychron-k7max-cad",
   "url": "https://github.com/Keychron/Keychron-Keyboards-Hardware-Design/tree/main/K-Max-Series/K7%20Max",
   "accessed": "2026-11-05",
   "kind": "manufacturer CAD index (Keychron Source-Available License)",
   "used_for": "Low-profile alternative with STEP/DWG/PDF; licence forbids redistribution of modified files - not imported"
  },
  {
   "id": "keychron-k7max-store",
   "url": "https://www.keychron.com/products/keychron-k7-max-qmk-via-wireless-custom-mechanical-keyboard",
   "accessed": "2026-11-05",
   "kind": "manufacturer store",
   "used_for": "All 6 variants unavailable on 2026-11-05; 306 x 97.5 mm, 436 g, 1550 mAh",
   "local_copy": "downloads/shopify/keychron_k7max.js"
  },
  {
   "id": "kbdfans-dz60rgb-v2",
   "url": "https://kbdfans.com/products/dz60rgb-hot-swap-custom-keyboard-pcb",
   "accessed": "2026-11-05",
   "kind": "vendor listing",
   "used_for": "Rejected: 63-key, out of stock 2026-11-05",
   "local_copy": "downloads/shopify/kbdfans_dz60rgb-hot-swap-custom-keyboard-pcb.js"
  },
  {
   "id": "jlc-kailh-socket",
   "url": "https://jlcpcb.com/partdetail/HanElectricity-CPG151101S1116/C41430893",
   "accessed": "2026-11-05",
   "kind": "distributor listing",
   "used_for": "Socket package 14.5 x 5.9 mm (height not stated; datasheet not retrieved)"
  }
 ],
 "dimensions": [
  {
   "item": "Key pitch / grid",
   "value": "19.05 mm; 15 x 5 u",
   "src": "qmk-60-ansi-arrow, gh60-kicad",
   "unc": "exact",
   "class": "documented"
  },
  {
   "item": "PCB outline",
   "value": "285.0 x 94.6 mm, R2",
   "src": "gh60-kicad; dk6164_top fit 285.65 x 94.6",
   "unc": "+/-0.7 mm on DK61-64 (edge detection)",
   "class": "CAD (GH60) + photo"
  },
  {
   "item": "PCB thickness",
   "value": "1.6 mm",
   "src": "gh60-kicad",
   "unc": "+/-0.1",
   "class": "assumed (typical; GH60 KiCad 1.6002)"
  },
  {
   "item": "Mount holes H1-H4",
   "value": "(25.2,27.9) (128.2,47.0) (190.5,85.2) (260.05,27.9) from PCB top-left",
   "src": "gh60-kicad; photo fits",
   "unc": "GK64XS <=0.46 mm; DK61-64 0.4-1.3 mm (H4 -1.3 x)",
   "class": "CAD + photo"
  },
  {
   "item": "Edge slots S5/S6",
   "value": "y=56.5, 7 x 2.5 drill open to edge",
   "src": "gh60-kicad; underside map (y 56.0-58.6)",
   "unc": "+/-0.5",
   "class": "CAD + photo"
  },
  {
   "item": "Flex cuts (DK61-64)",
   "value": "4 slots ~1.5 wide at y 16.3/35.4/54.8/75.0",
   "src": "underside_map.json",
   "unc": "+/-0.5",
   "class": "photo"
  },
  {
   "item": "USB-C receptacle",
   "value": "underside, rear edge, centre x=18.4 from left",
   "src": "dk6164 rectified crops",
   "unc": "+/-0.5 x; envelope 8.94 x 7.35 x 3.26 assumed",
   "class": "photo (+GH60 J1 18.2)"
  },
  {
   "item": "Plate thickness",
   "value": "1.5 mm",
   "src": "cherry-mx1a",
   "unc": "+/-0.15; YMDK does not state",
   "class": "documented (Cherry spec) / assumed for YMDK aluminium"
  },
  {
   "item": "Plate outline",
   "value": "285 x 94.6 assumed",
   "src": "plate fits",
   "unc": "+/-1",
   "class": "assumed; photo hull 284.3-284.7 x 93.1-93.3 (biased low)"
  },
  {
   "item": "Plate cut-out",
   "value": "14.0 x 14.0",
   "src": "cherry-mx1a (0.551 in)",
   "unc": "+/-0.05",
   "class": "documented"
  },
  {
   "item": "Plate top above PCB top",
   "value": "5.0 mm",
   "src": "cherry-mx1a (0.20 in)",
   "unc": "+0.3 (0.197+0.012 in)",
   "class": "documented"
  },
  {
   "item": "Switch housing top / stem top above PCB",
   "value": "11.6 / 15.2 mm",
   "src": "cherry-mx1a",
   "unc": "clones vary ~+/-0.3",
   "class": "documented"
  },
  {
   "item": "Travel / pre-travel",
   "value": "4.0 / 2.0 mm",
   "src": "cherry-mx2a, cherry-mx1a",
   "unc": "-0.4 / +/-0.6",
   "class": "documented"
  },
  {
   "item": "Keycap skirt at rest",
   "value": "11.3 mm above PCB top",
   "src": "engineering estimate",
   "unc": "+/-0.8",
   "class": "assumed"
  },
  {
   "item": "Keycap height",
   "value": "Cherry 9.4 (default); OEM 11.9; DSA 7.5; MDA 7.45; SA 16.5",
   "src": "keychron-profiles",
   "unc": "+/-0.5; per-row sculpt not modelled",
   "class": "documented-approx"
  },
  {
   "item": "Keycap size",
   "value": "u x 19.05 - 0.95 mm footprint",
   "src": "common practice",
   "unc": "+/-0.2",
   "class": "assumed (18.1 mm 1u)"
  },
  {
   "item": "2u / 2.25u stabiliser spacing",
   "value": "23.876 mm",
   "src": "cherry-mx1a A=0.94 in",
   "unc": "+/-0.1",
   "class": "documented"
  },
  {
   "item": "6.25u stabiliser spacing",
   "value": "100.0 mm",
   "src": "gh60-kicad MXST 80.585/180.597",
   "unc": "+/-0.05",
   "class": "CAD"
  },
  {
   "item": "Hot-swap socket height",
   "value": "1.85 mm",
   "src": "datasheet not retrieved",
   "unc": "+0.3",
   "class": "assumed"
  }
 ],
 "cad_inspection": {
  "file": "downloads/gh60_komar/keyboard.kicad_pcb",
  "parser": "scripts/parse_gh60.py",
  "outline": "285.0 x 94.6, 4 x R2 arcs (Edge.Cuts)",
  "switch_grid_origin_from_top_left": [
   -0.377,
   -0.326
  ],
  "usb_J1_x": 18.2,
  "mount_holes": "PKRHC round 2.5 @ (25.199,27.901); PKRH oval 5.0x2.5 @ (128.2,47.0),(190.499,85.201),(260.05,27.901); PKRHSL 7.0x2.5 @ (1.459,56.501),(283.541,56.501)",
  "stab_footprint": "MXST: 3.048 hole at -6.985 (rear), 3.980 at +8.255 (front) from stab centre; 6.25u pair 100.012 apart"
 },
 "photogrammetry": {
  "method": "Uncalibrated product photos -> planar homography (cv2.findHomography, least squares) between detected switch-centre holes / plate cut-outs and the GH60/GK64 mm grid; residuals back-projected to mm; leave-one-out RMS reported. Underside photo fitted with a mirrored model. Holes measured in 12 px/mm rectified windows.",
  "fits": {
   "dk6164_top": {
    "image": "MG_0487_953b60d9-6884-4b56-826c-7d2c4dd02366.jpg",
    "registration_points": 63,
    "registration_rms_mm": 0.131,
    "registration_max_mm": 0.358,
    "leave_one_out_rms_mm": 0.147,
    "keys_found": 63,
    "keys_total": 64,
    "width_estimate_mm": 285.65,
    "depth_estimate_mm": 94.6,
    "edges": {
     "top": {
      "median_offset_mm": -0.7,
      "mad_mm": 0.05,
      "samples": 25
     },
     "bottom": {
      "median_offset_mm": 0.7,
      "mad_mm": 0.15,
      "samples": 25
     },
     "left": {
      "median_offset_mm": 0.35,
      "mad_mm": 0.05,
      "samples": 25
     },
     "right": {
      "median_offset_mm": 0.3,
      "mad_mm": 0.05,
      "samples": 25
     }
    },
    "holes": [
     {
      "id": "H1",
      "kind": "round",
      "nominal_mm": [
       25.199,
       27.901
      ],
      "source": "PKRHC",
      "measured_mm": [
       24.699,
       28.193
      ],
      "feature_size_mm": [
       6.17,
       2.92
      ],
      "residual_mm": 0.579,
      "method": "rectified 12px/mm window, plated-feature bbox centre"
     },
     {
      "id": "H2",
      "kind": "slot",
      "nominal_mm": [
       128.2,
       47.0
      ],
      "source": "PKRH (oval drill 5.0x2.5)",
      "measured_mm": [
       128.325,
       47.375
      ],
      "feature_size_mm": [
       5.25,
       2.75
      ],
      "residual_mm": 0.395,
      "method": "rectified 12px/mm window, plated-feature bbox centre"
     },
     {
      "id": "H3",
      "kind": "slot",
      "nominal_mm": [
       190.499,
       85.201
      ],
      "source": "PKRH (oval drill 5.0x2.5)",
      "measured_mm": [
       189.832,
       85.159
      ],
      "feature_size_mm": [
       5.0,
       2.25
      ],
      "residual_mm": 0.668,
      "method": "rectified 12px/mm window, plated-feature bbox centre"
     },
     {
      "id": "H4",
      "kind": "slot",
      "nominal_mm": [
       260.05,
       27.901
      ],
      "source": "PKRH (oval drill 5.0x2.5)",
      "measured_mm": [
       258.758,
       28.234
      ],
      "feature_size_mm": [
       6.08,
       3.17
      ],
      "residual_mm": 1.334,
      "method": "rectified 12px/mm window, plated-feature bbox centre"
     },
     {
      "id": "S5",
      "kind": "edge-slot",
      "nominal_mm": [
       1.459,
       56.501
      ],
      "source": "PKRHSL"
     },
     {
      "id": "S6",
      "kind": "edge-slot",
      "nominal_mm": [
       283.541,
       56.501
      ],
      "source": "PKRHSL"
     }
    ],
    "caveat": "Single uncalibrated product photo; lens distortion and perspective are absorbed only to first (projective) order. Edge/hole detections are automatic and checked visually in overlay.",
    "missing_keys": [
     "Shift"
    ]
   },
   "dk6164_bottom": {
    "image": "MG_0486_dec1d186-8a78-4b71-b8e4-b47b75e67fd8.jpg",
    "registration_points": 57,
    "registration_rms_mm": 0.268,
    "registration_max_mm": 0.674,
    "leave_one_out_rms_mm": 0.298,
    "keys_found": 57,
    "keys_total": 64,
    "width_estimate_mm": 284.05,
    "depth_estimate_mm": 92.85,
    "edges": {
     "top": {
      "median_offset_mm": -2.5,
      "mad_mm": 0.4,
      "samples": 25
     },
     "bottom": {
      "median_offset_mm": 0.75,
      "mad_mm": 0.25,
      "samples": 25
     },
     "left": {
      "median_offset_mm": 0.35,
      "mad_mm": 0.1,
      "samples": 25
     },
     "right": {
      "median_offset_mm": -1.3,
      "mad_mm": 1.95,
      "samples": 25
     }
    },
    "holes": [
     {
      "id": "H1",
      "kind": "round",
      "nominal_mm": [
       25.199,
       27.901
      ],
      "source": "PKRHC",
      "measured_mm": [
       24.907,
       28.234
      ],
      "feature_size_mm": [
       5.75,
       3.0
      ],
      "residual_mm": 0.443,
      "method": "rectified 12px/mm window, plated-feature bbox centre"
     },
     {
      "id": "H2",
      "kind": "slot",
      "nominal_mm": [
       128.2,
       47.0
      ],
      "source": "PKRH (oval drill 5.0x2.5)"
     },
     {
      "id": "H3",
      "kind": "slot",
      "nominal_mm": [
       190.499,
       85.201
      ],
      "source": "PKRH (oval drill 5.0x2.5)"
     },
     {
      "id": "H4",
      "kind": "slot",
      "nominal_mm": [
       260.05,
       27.901
      ],
      "source": "PKRH (oval drill 5.0x2.5)",
      "measured_mm": [
       259.967,
       26.651
      ],
      "feature_size_mm": [
       8.17,
       6.33
      ],
      "residual_mm": 1.253,
      "method": "rectified 12px/mm window, plated-feature bbox centre"
     },
     {
      "id": "S5",
      "kind": "edge-slot",
      "nominal_mm": [
       1.459,
       56.501
      ],
      "source": "PKRHSL"
     },
     {
      "id": "S6",
      "kind": "edge-slot",
      "nominal_mm": [
       283.541,
       56.501
      ],
      "source": "PKRHSL"
     }
    ],
    "caveat": "Single uncalibrated product photo; lens distortion and perspective are absorbed only to first (projective) order. Edge/hole detections are automatic and checked visually in overlay.",
    "missing_keys": [
     "A",
     "Shift",
     "/",
     "\u2191",
     "Fn",
     "\u2193",
     "\u2192"
    ]
   },
   "gk64xs_top": {
    "image": "GK64XS_2.jpg",
    "registration_points": 39,
    "registration_rms_mm": 0.304,
    "registration_max_mm": 0.58,
    "leave_one_out_rms_mm": 0.36,
    "keys_found": 39,
    "keys_total": 64,
    "width_estimate_mm": 285.6,
    "depth_estimate_mm": 93.75,
    "edges": {
     "top": {
      "median_offset_mm": -0.45,
      "mad_mm": 0.05,
      "samples": 25
     },
     "bottom": {
      "median_offset_mm": -0.4,
      "mad_mm": 0.1,
      "samples": 25
     },
     "left": {
      "median_offset_mm": 0.0,
      "mad_mm": 0.1,
      "samples": 25
     },
     "right": {
      "median_offset_mm": 0.6,
      "mad_mm": 0.05,
      "samples": 25
     }
    },
    "holes": [
     {
      "id": "H1",
      "kind": "round",
      "nominal_mm": [
       25.199,
       27.901
      ],
      "source": "PKRHC",
      "measured_mm": [
       25.241,
       27.901
      ],
      "feature_size_mm": [
       5.08,
       5.0
      ],
      "residual_mm": 0.042,
      "method": "rectified 12px/mm window, plated-feature bbox centre"
     },
     {
      "id": "H2",
      "kind": "slot",
      "nominal_mm": [
       128.2,
       47.0
      ],
      "source": "PKRH (oval drill 5.0x2.5)",
      "measured_mm": [
       128.367,
       47.042
      ],
      "feature_size_mm": [
       7.67,
       4.92
      ],
      "residual_mm": 0.172,
      "method": "rectified 12px/mm window, plated-feature bbox centre"
     },
     {
      "id": "H3",
      "kind": "slot",
      "nominal_mm": [
       190.499,
       85.201
      ],
      "source": "PKRH (oval drill 5.0x2.5)",
      "measured_mm": [
       190.207,
       85.159
      ],
      "feature_size_mm": [
       7.75,
       5.42
      ],
      "residual_mm": 0.295,
      "method": "rectified 12px/mm window, plated-feature bbox centre"
     },
     {
      "id": "H4",
      "kind": "slot",
      "nominal_mm": [
       260.05,
       27.901
      ],
      "source": "PKRH (oval drill 5.0x2.5)",
      "measured_mm": [
       260.508,
       27.901
      ],
      "feature_size_mm": [
       8.08,
       5.5
      ],
      "residual_mm": 0.458,
      "method": "rectified 12px/mm window, plated-feature bbox centre"
     },
     {
      "id": "S5",
      "kind": "edge-slot",
      "nominal_mm": [
       1.459,
       56.501
      ],
      "source": "PKRHSL"
     },
     {
      "id": "S6",
      "kind": "edge-slot",
      "nominal_mm": [
       283.541,
       56.501
      ],
      "source": "PKRHSL"
     }
    ],
    "caveat": "Single uncalibrated product photo; lens distortion and perspective are absorbed only to first (projective) order. Edge/hole detections are automatic and checked visually in overlay.",
    "missing_keys": [
     "2",
     "5",
     "7",
     "8",
     "0",
     "-",
     "=",
     "Backspace",
     "W",
     "R",
     "[",
     "S",
     "H",
     "'",
     "Z",
     "V",
     "B",
     ",",
     ".",
     "Shift",
     "\u2191",
     "Fn",
     "Menu",
     "\u2193",
     "\u2192"
    ]
   },
   "gk64_fr4_plate": {
    "image": "3dcc9edeb45e5a9ec3248cd90f8c799b.png",
    "registration_points": 53,
    "registration_rms_mm": 0.105,
    "registration_max_mm": 0.246,
    "leave_one_out_rms_mm": 0.119,
    "plate_outline_estimate_mm": [
     284.33,
     93.11
    ],
    "outline_note": "Outline from convex-hull corners back-projected; rounded corners and thickness/edge bevel bias it by ~0.5-1 mm.",
    "keys_present": 64,
    "caveat": "Uncalibrated oblique product photo; planar homography only. Cut-out centroid of a projected square differs from projected centre by <0.1 mm at these angles.",
    "row3_layout_test": {
     "row3_cutout_x_mm": [
      19.07,
      47.23,
      66.37,
      85.42,
      104.47,
      123.49,
      142.49,
      161.45,
      180.4,
      199.52,
      218.66,
      237.73,
      246.25,
      256.77,
      269.65,
      276.04
     ],
     "mean_dev_2u_layout_mm": 0.08,
     "mean_dev_225u_layout_mm": 4.78
    }
   },
   "ymdk60_plate_black": {
    "image": "IMG_6565.jpg",
    "registration_points": 37,
    "registration_rms_mm": 0.069,
    "registration_max_mm": 0.139,
    "leave_one_out_rms_mm": 0.082,
    "plate_outline_estimate_mm": [
     284.71,
     93.26
    ],
    "outline_note": "Outline from convex-hull corners back-projected; rounded corners and thickness/edge bevel bias it by ~0.5-1 mm.",
    "keys_present": 64,
    "caveat": "Uncalibrated oblique product photo; planar homography only. Cut-out centroid of a projected square differs from projected centre by <0.1 mm at these angles.",
    "row3_layout_test": {
     "row3_cutout_x_mm": [
      47.28,
      66.29,
      85.35,
      104.4,
      123.42,
      142.4,
      161.47,
      180.58,
      199.68,
      218.74,
      237.79,
      266.37
     ],
     "mean_dev_2u_layout_mm": 0.03,
     "mean_dev_225u_layout_mm": 4.78
    }
   }
  },
  "underside_map": {
   "occupied_fraction": 0.444,
   "edge_free_band_mm": {
    "top": {
     "min": 0.25,
     "p10": 1.38,
     "median": 1.62
    },
    "bottom": {
     "min": 0.0,
     "p10": 1.0,
     "median": 3.12
    },
    "left": {
     "min": 0.0,
     "p10": 0.0,
     "median": 2.88
    },
    "right": {
     "min": 0.0,
     "p10": 0.0,
     "median": 3.56
    }
   },
   "mount_holes": [
    {
     "id": "H1",
     "nominal_mm": [
      25.199,
      27.901
     ],
     "clear_radius_to_visible_parts_mm": 4.88
    },
    {
     "id": "H2",
     "nominal_mm": [
      128.2,
      47.0
     ],
     "clear_radius_to_visible_parts_mm": 4.15
    },
    {
     "id": "H3",
     "nominal_mm": [
      190.499,
      85.201
     ],
     "clear_radius_to_visible_parts_mm": 4.09
    },
    {
     "id": "H4",
     "nominal_mm": [
      260.05,
      27.901
     ],
     "clear_radius_to_visible_parts_mm": 4.09
    }
   ],
   "pad_candidates_mm": [
    {
     "x": 178.4,
     "y": 82.1,
     "free_radius": 5.92
    },
    {
     "x": 237.8,
     "y": 72.1,
     "free_radius": 5.77
    },
    {
     "x": 35.4,
     "y": 90.5,
     "free_radius": 5.35
    },
    {
     "x": 59.4,
     "y": 90.5,
     "free_radius": 5.35
    },
    {
     "x": 271.6,
     "y": 66.5,
     "free_radius": 4.6
    },
    {
     "x": 259.2,
     "y": 36.9,
     "free_radius": 4.57
    },
    {
     "x": 29.1,
     "y": 52.6,
     "free_radius": 4.37
    },
    {
     "x": 145.9,
     "y": 90.5,
     "free_radius": 4.12
    },
    {
     "x": 105.2,
     "y": 80.6,
     "free_radius": 4.09
    },
    {
     "x": 281.0,
     "y": 43.4,
     "free_radius": 3.5
    },
    {
     "x": 61.9,
     "y": 49.6,
     "free_radius": 3.42
    },
    {
     "x": 157.1,
     "y": 49.6,
     "free_radius": 3.42
    },
    {
     "x": 248.8,
     "y": 4.9,
     "free_radius": 3.38
    },
    {
     "x": 100.1,
     "y": 49.6,
     "free_radius": 3.38
    }
   ],
   "through_cuts_mm": [
    {
     "x0": 0.0,
     "x1": 12.9,
     "y0": 0.0,
     "y1": 1.1,
     "area_mm2": 5.5
    },
    {
     "x0": 24.0,
     "x1": 285.0,
     "y0": 0.0,
     "y1": 0.8,
     "area_mm2": 156.0
    },
    {
     "x0": 30.8,
     "x1": 247.2,
     "y0": 15.4,
     "y1": 17.1,
     "area_mm2": 304.6
    },
    {
     "x0": 40.8,
     "x1": 245.6,
     "y0": 34.6,
     "y1": 36.2,
     "area_mm2": 276.0
    },
    {
     "x0": 45.5,
     "x1": 236.5,
     "y0": 54.0,
     "y1": 55.5,
     "area_mm2": 251.9
    },
    {
     "x0": 0.0,
     "x1": 4.1,
     "y0": 56.0,
     "y1": 58.4,
     "area_mm2": 8.9
    },
    {
     "x0": 280.9,
     "x1": 285.0,
     "y0": 56.4,
     "y1": 58.6,
     "area_mm2": 7.9
    },
    {
     "x0": 54.2,
     "x1": 231.4,
     "y0": 73.1,
     "y1": 76.8,
     "area_mm2": 237.1
    },
    {
     "x0": 68.6,
     "x1": 78.2,
     "y0": 92.0,
     "y1": 94.5,
     "area_mm2": 23.1
    }
   ],
   "method": "Homography-rectified YMDK MG_0486 underside photo; dark (<62% board grey) or saturated pixels = visible parts; 1 mm dilation.",
   "limits": "Traces under solder mask and parts hidden by glare are not detected. Registration RMS ~0.27 mm (see dk6164_bottom_fit.json). Validate on the purchased board before drilling."
  }
 },
 "bed_proposal": {
  "summary": "Tray-mount the PCB on four slot-tolerant M2 standoffs at the GH60 plated holes over a removable, drillable 3 mm backplate (aluminium 5052/6061 or FR4) carried by two replaceable end rails outside the PCB width; add ~10 compliant 5 mm Poron/silicone pads only at photo-verified component-free sites.",
  "stack_mm": {
   "bedUnderside": 0,
   "bedTop": 3.0,
   "pcbBottom": 7.0,
   "pcbTop": 8.6,
   "plateTop": 13.6,
   "keyTopCherry": 29.3
  },
  "rules": [
   "Hard contact only at the four plated mount holes (annulus within 4.1-4.9 mm radius free of visible parts).",
   "All other support is compliant (Poron 4 mm, ~10-15% compression) so unseen traces under solder mask are never point-loaded.",
   "4.0 mm under-PCB gap clears sockets (~1.85 assumed) and the 3.26 mm USB-C receptacle at the rear-left; a stepped 2.5 mm gap is acceptable away from the USB zone.",
   "Backplate holes are drilled after a test fit (DK61-64 hole offsets up to 1.3 mm); use heat-set M2 inserts or slotted printed bosses.",
   "End rails sit at |x| 146.5-158.5 mm (outside the PCB and plate), so no rail crosses the keyboard underside; rail-to-shell fasteners are not specified here.",
   "Access: hot-swap switches above H1-H4 lift out to reach screws; the whole bed lifts out with the keyboard for service."
  ],
  "pad_sites_pcb_frame": [
   [
    178.4,
    82.1
   ],
   [
    237.8,
    72.1
   ],
   [
    35.4,
    90.5
   ],
   [
    105.2,
    80.6
   ],
   [
    259.2,
    36.9
   ],
   [
    29.1,
    52.6
   ],
   [
    61.9,
    49.6
   ],
   [
    157.1,
    49.6
   ],
   [
    248.8,
    4.9
   ],
   [
    100.1,
    49.6
   ]
  ],
  "not_claimed": "No load rating or stiffness test; no screw locations into the Otterchip shell are specified."
 },
 "fit_impact": {
  "basis": "Model M Study 12 defaults (width 355, deck 66.5 @ 4 deg, keyboardZ 36, keyboardBack -16, underlap 39, drop 18, cover 3.5, pad gap 14.5/depth 41/rise 11).",
  "currentVisual": {
   "plate": [
    264,
    91
   ],
   "keyField": [
    255.2,
    88.0
   ],
   "pitch": 17.6,
   "units": 14.5,
   "spacebar_u": 5.25,
   "keyTopAboveDeck": 7.25,
   "note": "Made-up arrangement, not a commercial layout."
  },
  "real": {
   "pcb": [
    285,
    94.6
   ],
   "keycapField": [
    284.8,
    94.3
   ],
   "deckOpening": [
    286.8,
    96.3
   ],
   "bedWithRails": [
    317.0,
    102.6
   ],
   "pitch": 19.05,
   "units": 15,
   "spacebar_u": 6.25
  },
  "deltas": {
   "width_keyfield_mm": 29.6,
   "depth_keyfield_mm": 6.3,
   "width_plate_mm": 21,
   "depth_plate_mm": 3.6,
   "keyboard_half_depth_constant": {
    "current": 45.5,
    "deckOpening": 48.15,
    "pcbPlate": 47.3,
    "bed": 51.3
   }
  },
  "sideWallsEachSide_mm": 34.1,
  "endRailToMusicWheel_x_mm": 2.5,
  "rear": {
   "openingRearZ": -12.03,
   "flatDeckBehindOpening_mm": 3.97,
   "bedRearZ": -15.18,
   "usbPlugKeepoutEndZ": -41.7,
   "note": "USB-C exits the rear edge at x=-124.1 about 9-10 mm below the deck plane, under the rising screen transition (interior volume); straight-plug keep-out 30 mm, right-angle plug preferred."
  },
  "keyTopAboveDeck_by_profile_mm": {
   "cherry": 12.7,
   "oem": 15.2,
   "dsa": 10.8,
   "mda": 10.75,
   "sa": 19.8
  },
  "keyTopAbsolute_cherry_mm": 79.2,
  "cushion": {
   "rearEdgeToOpening_mm": 11.85,
   "cushionTopVsSpacebarTop_deckFrame_mm": -0.8,
   "note": "Cushion seat +0.3, carrier 0.6, rise 11 measured perpendicular to the deck; space-bar top uses the Cherry nominal (sculpt ignored)."
  },
  "musicBay": {
   "keybedRearAlongSlope": 27.5,
   "overlapUnderTypingPCB_mm": 19.8,
   "overlapUnderBed_mm": 23.8,
   "requiredVerticalGap_mm": 3.0,
   "options": [
    {
     "option": "A  as-is: drop 18, deck 3 mm above plate, 4 mm under-PCB gap, 3 mm bed",
     "deckAbovePlate": 3.0,
     "mididrop": 18,
     "deckToBedUnderside_mm": 16.6,
     "verticalGapToKeybedReservation_mm": 1.36,
     "meets_3mm": false,
     "minDeckForDrop": 58.9,
     "note": "fails the 3 mm target"
    },
    {
     "option": "B  drop 20 (recommended minimal change)",
     "deckAbovePlate": 3.0,
     "mididrop": 20,
     "deckToBedUnderside_mm": 16.6,
     "verticalGapToKeybedReservation_mm": 3.36,
     "meets_3mm": true,
     "minDeckForDrop": 60.9,
     "note": "deck height unchanged (minimum deck stays below 66.5)"
    },
    {
     "option": "C  drop 18, deck only 1.5 mm above plate",
     "deckAbovePlate": 1.5,
     "mididrop": 18,
     "deckToBedUnderside_mm": 15.1,
     "verticalGapToKeybedReservation_mm": 2.86,
     "meets_3mm": false,
     "minDeckForDrop": 58.9,
     "note": "key tops rise 1.5 mm further above the deck"
    },
    {
     "option": "D  drop 18, stepped bed in the overlap band: 2.5 mm gap + 1.5 mm aluminium",
     "deckAbovePlate": 3.0,
     "mididrop": 18,
     "deckToBedUnderside_mm": 13.6,
     "verticalGapToKeybedReservation_mm": 4.37,
     "meets_3mm": true,
     "minDeckForDrop": 58.9,
     "note": "USB-C zone is at the rear and keeps the 4 mm gap"
    }
   ],
   "openingLipMovesForward_mm": 2.65
  },
  "parentChanges": [
   "Replace the 45.5 mm keyboard half-depth constant (cushionDistance, musicFrontZ, musicBayDimensions.keyboardFrontZ, available pad depth) with 48.15 (deck opening) and keep 47.3 for the PCB/plate.",
   "Replace the 264 x 91 keyboardPlate box with buildOtterchipTypingKeyboard(THREE, ...) placed at y = otterchipTypingOriginForDeck(deck, 3.0) in the deck-tangent frame (rotation.x = slope).",
   "Cut the deck opening at 286.75 x 96.3 mm (keycap field + 1 mm) and keep its perimeter open for key travel; the hard deck sits 3.0 mm above the plate top.",
   "Raise mididrop from 18 to >= 20 (or step the bed in the overlap band) so the bed underside clears the provisional SE25 reservation by >= 3 mm.",
   "Either move the keyboard 2.65 mm rearward (opening rear edge stays 1.3 mm ahead of keyboardBack) or accept that the typing deck lip covers 2.65 mm more of the music-key rear.",
   "Update the spec line \"Keyboard footprint stays 264 x 91 mm\" and the \"key tops about 7 mm higher\" help text (Cherry: ~12.7 mm).",
   "Map shared palettes through OTTERCHIP_TYPING_DATA.keys[].role (alpha, number, modifier, accent, system, shift, arrow, space, function) and keys[].code."
  ]
 },
 "component": {
  "file": "web/otterchip-component-typing.js",
  "api": "buildOtterchipTypingKeyboard(THREE, options) -> THREE.Group; OTTERCHIP_TYPING_DATA; otterchipTypingOriginForDeck(deckY, deckAbovePlate=3)",
  "options": {
   "variant": "'dk6164' | 'gk64x'",
   "profile": "'cherry' | 'oem' | 'dsa' | 'mda' | 'sa'",
   "capHeight": "number override",
   "palette": "{role: css colour}",
   "keyColors": "{KeyboardEvent.code: colour}",
   "legendInk": "css colour",
   "show": "{keycaps, legends, switches, stabilizers, plate, pcb, sockets, usb, bed, backplate, keepouts, currentVisual}",
   "bedMargin": "mm (default 4)",
   "padSites": "[[x,y] PCB frame]",
   "colors": "{part: hex}"
  },
  "returns": "group.userData.otterchipTyping = {keyTopY, datumsY, keyMeshes {\"CODE:KeyA\": [group]}, caps [], envelope}; key groups carry userData {code, codes, legend, role, baseY, travel}",
  "frame": "x right, y up, z front; origin PCB-footprint centre, y=0 underside of proposed bed; mm",
  "datumsY": {
   "bedBottom": 0,
   "bedTop": 3,
   "pcbBottom": 7,
   "pcbTop": 8.6,
   "plateTop": 13.6,
   "plateBottom": 12.1,
   "housingTop": 20.2,
   "stemTop": 23.799999999999997,
   "capSkirt": 19.9
  },
  "roles": [
   "alpha",
   "number",
   "modifier",
   "accent",
   "system",
   "shift",
   "arrow",
   "space",
   "function"
  ],
  "keys": 64
 },
 "exports": [
  {
   "file": "component_data_snapshot.json",
   "bytes": 29870,
   "sha256_16": "94bfb09419873951"
  },
  {
   "file": "otterchip-typing-dk6164-bare.glb",
   "bytes": 3646228,
   "sha256_16": "fcc4eebd9f1ded69"
  },
  {
   "file": "otterchip-typing-dk6164-bare.mtl",
   "bytes": 562,
   "sha256_16": "cf3e034f55dd1d12"
  },
  {
   "file": "otterchip-typing-dk6164-bare.obj",
   "bytes": 4869446,
   "sha256_16": "979d2c020f1977d8"
  },
  {
   "file": "otterchip-typing-dk6164-full.glb",
   "bytes": 3782544,
   "sha256_16": "ae69dac3f0c3897d"
  },
  {
   "file": "otterchip-typing-dk6164-full.mtl",
   "bytes": 738,
   "sha256_16": "d7da179d72b715dc"
  },
  {
   "file": "otterchip-typing-dk6164-full.obj",
   "bytes": 5099427,
   "sha256_16": "76bf7a675b0cf519"
  },
  {
   "file": "otterchip-typing-gk64x-full.glb",
   "bytes": 3715980,
   "sha256_16": "f30be79e110315a1"
  },
  {
   "file": "otterchip-typing-gk64x-full.mtl",
   "bytes": 738,
   "sha256_16": "5766d6650469314e"
  },
  {
   "file": "otterchip-typing-gk64x-full.obj",
   "bytes": 4944170,
   "sha256_16": "7711c088341b1ca8"
  }
 ],
 "assets": {
  "dk6164_top_overlay": "assets/dk6164_top_overlay.jpg",
  "dk6164_bottom_overlay": "assets/dk6164_bottom_overlay.jpg",
  "gk64xs_top_overlay": "assets/gk64xs_top_overlay.jpg",
  "gk64_fr4_plate_overlay": "assets/gk64_fr4_plate_overlay.jpg",
  "ymdk60_plate_black_overlay": "assets/ymdk60_plate_black_overlay.jpg",
  "underside_keepout": "assets/underside_keepout.jpg",
  "layout_2ushift": "assets/ymdk_layout_2ushift.jpg",
  "plate_layouts": "assets/ymdk_plate_layouts.jpg",
  "gk64xs_silk": "assets/gk64xs_pcb_photo.jpg",
  "cherry_drawing": "assets/cherry_mx1a_drawing_p2.jpg",
  "cherry_stab": "assets/cherry_mx1a_drawing_p5.jpg"
 },
 "unknowns": [
  "Real DK61-64 / Plate A dimensions, plate thickness and plate outline (no vendor drawing).",
  "Exact PCB-stab footprint on DK61-64 and whether Plate A stab openings match it (inferred).",
  "Component heights on the DK61-64 underside, trace routing under solder mask, socket height.",
  "USB-C receptacle part number and exact overhang; cable plug geometry chosen by owner.",
  "Keycap profile and per-row sculpt for the owner's chosen set; cap skirt height on the chosen switches.",
  "Switch clone variance (housing/stem heights) and plate fit tolerance.",
  "SE25 uncased keybed height/underlap (shared provisional reservation) - governs the vertical gap.",
  "Stiffness of a 3 mm printed backplate over a 300 mm span (aluminium/FR4 recommended); rail attachment to shell."
 ],
 "reproduce": [
  "cd hardware/otterchip_research/typing/scripts",
  "python3 parse_gh60.py ../downloads/gh60_komar/keyboard.kicad_pcb ../data/gh60_parsed.json",
  "python3 photo_fit.py ../downloads/img_ymdk_dk6164/MG_0487_953b60d9-6884-4b56-826c-7d2c4dd02366.jpg dk6164_top '[[100,707],[1869,707],[1869,1293],[100,1293]]' ../data/photofit pcb-holes light-board",
  "python3 photo_fit.py ../downloads/img_ymdk_dk6164/MG_0486_dec1d186-8a78-4b71-b8e4-b47b75e67fd8.jpg dk6164_bottom '[[115,703],[1878,703],[1878,1290],[115,1290]]' ../data/photofit pcb-holes light-board 80,18,5 mirror",
  "python3 photo_fit.py ../downloads/img_ymdk_gk64x/GK64XS_2.jpg gk64xs_top '[[110,696],[1890,696],[1890,1280],[110,1280]]' ../data/photofit pcb-holes dark-board 40,12,0",
  "python3 plate_fit.py ../downloads/img_ymdk_gk64x/3dcc9edeb45e5a9ec3248cd90f8c799b.png gk64_fr4_plate ../data/photofit",
  "python3 plate_fit.py ../downloads/img_ymdk_plate60/IMG_6565.jpg ymdk60_plate_black ../data/photofit",
  "python3 row3_check.py <plate image> ../data/photofit/<name>_fit.json",
  "python3 underside_map.py ../downloads/img_ymdk_dk6164/MG_0486_dec1d186-8a78-4b71-b8e4-b47b75e67fd8.jpg ../data/photofit/dk6164_bottom_fit.json ../data/photofit",
  "node render_export.js ../../../../web/research/typing/assets ../exports   (needs the local static server on :8766)",
  "python3 fit_and_diagrams.py ../exports/component_data_snapshot.json ../data/fit_impact.json ../../../../web/research/typing/assets",
  "pdftoppm -r 150 -png ../downloads/datasheets/cherry_mx1a_11nn_maltron.pdf ../downloads/datasheets_rendered/mx1a",
  "python3 build_report.py .. ../../../../web/research/typing"
 ],
 "notes": [
  "Python runs from scripts/ (Xcode python3 3.9 with user-site PIL/cv2); downloads are passed as arguments only.",
  "Vendor product photos (YMDK) are reproduced at reduced size as measurement evidence; replace before any public deployment if licensing is a concern."
 ]
}