seveibar/keyboard-utils
Based on the code provided, here's a concise summary of the electronic component: A keyboard utility library for parsing and generating keyboard layouts using the Keyboard Layout Editor (KLE) JSON format, with support for generating key matrices, reference designators, and diode routing for keyboard PCBs. Key features: - Parses KLE JSON layouts into key coordinate and metadata objects - Supports various keyboard layouts (60%, ANSI, ISO, Ergodox, etc.) - Generates unique reference designators for keys - Provides utility for adding diode routing in key matrices - TypeScript-based with React and tscircuit integration The library allows keyboard designers to easily convert layout designs into structured, machine-readable keyboard specifications.
- Version
- 0.0.19
- License
- unset
- Stars
- 3
dist/schematic.svg
PCB
Schematic
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="600" style="background-color: rgb(245, 241, 237)" data-real-to-screen-transform="matrix(326.0869565217,0,0,-326.0869565217,665.2173913043,300)" data-software-used-string="@tscircuit/core@0.0.1020"><style>
.boundary { fill: rgb(245, 241, 237); }
.schematic-boundary { fill: none; stroke: #fff; }
.component { fill: none; stroke: rgb(132, 0, 0); }
.chip { fill: rgb(255, 255, 194); stroke: rgb(132, 0, 0); }
.component-pin { fill: none; stroke: rgb(132, 0, 0); }
/* Basic per-trace hover fallback */
.trace:hover {
filter: invert(1);
}
.trace:hover .trace-crossing-outline {
opacity: 0;
}
.trace:hover .trace-junction {
filter: invert(1);
}
/* Net-hover highlighting: when a trace or its overlays are hovered,
invert color for all traces (base + overlays) sharing the same
subcircuit connectivity key. Also hide crossing outline during hover. */
.text { font-family: sans-serif; fill: rgb(0, 150, 0); }
.pin-number { fill: rgb(169, 0, 0); }
.port-label { fill: rgb(0, 100, 100); }
.component-name { fill: rgb(0, 100, 100); }
</style><rect class="boundary" x="0" y="0" width="1200" height="600"/><g data-circuit-json-type="schematic_component" data-schematic-component-id="schematic_component_0"><rect class="component chip" x="469.56521739127993" y="234.78260869565997" width="391.30434782604016" height="130.43478260868005" stroke-width="6.521739130434001px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay" x="469.56521739127993" y="234.78260869565997" width="391.30434782604016" height="130.43478260868005" fill="transparent"/><text x="469.56521739127993" y="407.60869565216103" fill="#006464" text-anchor="start" dominant-baseline="middle" font-family="sans-serif" font-size="58.695652173906px" transform="rotate(0, 469.56521739127993, 407.60869565216103)">A_1N4148WS</text><text x="469.56521739127993" y="192.39130434783897" fill="#006464" text-anchor="start" dominant-baseline="middle" font-family="sans-serif" font-size="58.695652173906px" transform="rotate(0, 469.56521739127993, 192.39130434783897)"></text><line class="component-pin" x1="469.56521739128004" y1="300" x2="345.652173913034" y2="300" stroke-width="6.521739130434001px"/><g data-schematic-port-id="source_port_0"><circle class="component-pin" cx="339.1304347826" cy="300" r="6.521739130434001" stroke-width="6.521739130434001px"/><rect x="332.608695652166" y="293.478260869566" width="13.043478260868001" height="13.043478260868001" opacity="0"/></g><text class="pin-number" x="404.34782608693996" y="293.478260869566" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="48.913043478255px" transform="">1</text><text class="pin-number" x="502.17391304345" y="300" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="start" dominant-baseline="middle" font-size="48.913043478255px" transform="">C</text><line class="component-pin" x1="860.86956521732" y1="300" x2="984.7826086955661" y2="300" stroke-width="6.521739130434001px"/><g data-schematic-port-id="source_port_1"><circle class="component-pin" cx="991.304347826" cy="300" r="6.521739130434001" stroke-width="6.521739130434001px"/><rect x="984.7826086955661" y="293.478260869566" width="13.043478260868001" height="13.043478260868001" opacity="0"/></g><text class="pin-number" x="926.0869565216601" y="293.478260869566" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="48.913043478255px" transform="">2</text><text class="pin-number" x="828.26086956515" y="300" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="48.913043478255px" transform="">A</text></g><g class="schematic-port-hover" data-schematic-port-id="source_port_0"><circle cx="339.1304347826" cy="300" r="13.043478260868001" fill="red" opacity="0"/></g><g class="schematic-port-hover" data-schematic-port-id="source_port_1"><circle cx="991.304347826" cy="300" r="13.043478260868001" fill="red" opacity="0"/></g></svg>