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/lib/index.ts/circuit.json
PCB
Schematic
[
{
"type": "source_project_metadata",
"source_project_metadata_id": "source_project_metadata_0",
"software_used_string": "@tscircuit/core@0.0.1020"
},
{
"type": "source_group",
"source_group_id": "source_group_0",
"is_subcircuit": true,
"was_automatically_named": true,
"subcircuit_id": "subcircuit_source_group_0"
},
{
"type": "source_port",
"source_port_id": "source_port_0",
"name": "C",
"pin_number": 1,
"port_hints": [
"C",
"pin1",
"1"
],
"source_component_id": "source_component_0",
"subcircuit_id": "subcircuit_source_group_0"
},
{
"type": "source_port",
"source_port_id": "source_port_1",
"name": "A",
"pin_number": 2,
"port_hints": [
"A",
"pin2",
"2"
],
"source_component_id": "source_component_0",
"subcircuit_id": "subcircuit_source_group_0"
},
{
"type": "source_component",
"source_component_id": "source_component_0",
"ftype": "simple_chip",
"name": "unnamed_chip1",
"manufacturer_part_number": "A_1N4148WS",
"supplier_part_numbers": {
"jlcpcb": [
"C57759"
]
},
"source_group_id": "source_group_0"
},
{
"type": "schematic_component",
"schematic_component_id": "schematic_component_0",
"center": {
"x": 0,
"y": 0
},
"rotation": 0,
"size": {
"width": 1.2000000000000002,
"height": 0.4
},
"pin_spacing": 0.2,
"port_labels": {
"pin1": "C",
"pin2": "A"
},
"source_component_id": "source_component_0",
"schematic_group_id": "schematic_group_0"
},
{
"type": "schematic_text",
"schematic_text_id": "schematic_text_0",
"text": "A_1N4148WS",
"schematic_component_id": "schematic_component_0",
"anchor": "left",
"rotation": 0,
"position": {
"x": -0.6000000000000001,
"y": -0.33
},
"color": "#006464",
"font_size": 0.18
},
{
"type": "schematic_text",
"schematic_text_id": "schematic_text_1",
"text": "",
"schematic_component_id": "schematic_component_0",
"anchor": "left",
"rotation": 0,
"position": {
"x": -0.6000000000000001,
"y": 0.33
},
"color": "#006464",
"font_size": 0.18
},
{
"type": "schematic_group",
"schematic_group_id": "schematic_group_0",
"is_subcircuit": true,
"subcircuit_id": "subcircuit_source_group_0",
"name": "unnamed_group1",
"center": {
"x": 0,
"y": 0
},
"width": 0,
"height": 0,
"schematic_component_ids": [],
"source_group_id": "source_group_0"
},
{
"type": "schematic_port",
"schematic_port_id": "schematic_port_0",
"schematic_component_id": "schematic_component_0",
"center": {
"x": -1,
"y": 0
},
"source_port_id": "source_port_0",
"facing_direction": "left",
"distance_from_component_edge": 0.4,
"side_of_component": "left",
"pin_number": 1,
"true_ccw_index": 0,
"display_pin_label": "C",
"is_connected": false
},
{
"type": "schematic_port",
"schematic_port_id": "schematic_port_1",
"schematic_component_id": "schematic_component_0",
"center": {
"x": 1,
"y": 0
},
"source_port_id": "source_port_1",
"facing_direction": "right",
"distance_from_component_edge": 0.4,
"side_of_component": "right",
"pin_number": 2,
"true_ccw_index": 1,
"display_pin_label": "A",
"is_connected": false
},
{
"type": "pcb_component",
"pcb_component_id": "pcb_component_0",
"center": {
"x": 0,
"y": 0
},
"width": 3.3451800000000222,
"height": 0.7500112,
"layer": "top",
"rotation": 0,
"source_component_id": "source_component_0",
"subcircuit_id": "subcircuit_source_group_0",
"do_not_place": false,
"obstructs_within_bounds": true,
"pcb_group_id": "pcb_group_0"
},
{
"type": "pcb_group",
"pcb_group_id": "pcb_group_0",
"is_subcircuit": true,
"subcircuit_id": "subcircuit_source_group_0",
"name": "unnamed_group1",
"anchor_position": {
"x": 0,
"y": 0
},
"center": {
"x": 0,
"y": 0
},
"width": 3.3451800000000222,
"height": 0.7500112,
"pcb_component_ids": [],
"source_group_id": "source_group_0",
"anchor_alignment": null
},
{
"type": "pcb_smtpad",
"pcb_smtpad_id": "pcb_smtpad_0",
"pcb_component_id": "pcb_component_0",
"pcb_port_id": "pcb_port_0",
"layer": "top",
"shape": "rect",
"width": 0.9999979999999999,
"height": 0.7500112,
"port_hints": [
"pin1"
],
"is_covered_with_solder_mask": false,
"x": -1.1725910000000113,
"y": 0,
"subcircuit_id": "subcircuit_source_group_0",
"pcb_group_id": "pcb_group_0"
},
{
"type": "pcb_solder_paste",
"pcb_solder_paste_id": "pcb_solder_paste_0",
"layer": "top",
"shape": "rect",
"width": 0.6999985999999999,
"height": 0.52500784,
"x": -1.1725910000000113,
"y": 0,
"pcb_component_id": "pcb_component_0",
"pcb_smtpad_id": "pcb_smtpad_0",
"subcircuit_id": "subcircuit_source_group_0",
"pcb_group_id": "pcb_group_0"
},
{
"type": "pcb_smtpad",
"pcb_smtpad_id": "pcb_smtpad_1",
"pcb_component_id": "pcb_component_0",
"pcb_port_id": "pcb_port_1",
"layer": "top",
"shape": "rect",
"width": 0.9999979999999999,
"height": 0.7500112,
"port_hints": [
"pin2"
],
"is_covered_with_solder_mask": false,
"x": 1.1725910000000113,
"y": 0,
"subcircuit_id": "subcircuit_source_group_0",
"pcb_group_id": "pcb_group_0"
},
{
"type": "pcb_solder_paste",
"pcb_solder_paste_id": "pcb_solder_paste_1",
"layer": "top",
"shape": "rect",
"width": 0.6999985999999999,
"height": 0.52500784,
"x": 1.1725910000000113,
"y": 0,
"pcb_component_id": "pcb_component_0",
"pcb_smtpad_id": "pcb_smtpad_1",
"subcircuit_id": "subcircuit_source_group_0",
"pcb_group_id": "pcb_group_0"
},
{
"type": "pcb_silkscreen_path",
"pcb_silkscreen_path_id": "pcb_silkscreen_path_0",
"pcb_component_id": "pcb_component_0",
"layer": "top",
"route": [
{
"x": 0.9012427999999773,
"y": -0.726211400000011
},
{
"x": 0.9012427999999773,
"y": -0.5199887999999646
}
],
"stroke_width": 0.1,
"subcircuit_id": "subcircuit_source_group_0",
"pcb_group_id": "pcb_group_0"
},
{
"type": "pcb_silkscreen_path",
"pcb_silkscreen_path_id": "pcb_silkscreen_path_1",
"pcb_component_id": "pcb_component_0",
"layer": "top",
"route": [
{
"x": 0.9012427999999773,
"y": 0.726211400000011
},
{
"x": 0.9012427999999773,
"y": 0.5299964000000728
}
],
"stroke_width": 0.1,
"subcircuit_id": "subcircuit_source_group_0",
"pcb_group_id": "pcb_group_0"
},
{
"type": "pcb_silkscreen_path",
"pcb_silkscreen_path_id": "pcb_silkscreen_path_2",
"pcb_component_id": "pcb_component_0",
"layer": "top",
"route": [
{
"x": -0.8512047999998913,
"y": 0.726211400000011
},
{
"x": 0.9012427999999773,
"y": 0.726211400000011
}
],
"stroke_width": 0.1,
"subcircuit_id": "subcircuit_source_group_0",
"pcb_group_id": "pcb_group_0"
},
{
"type": "pcb_silkscreen_path",
"pcb_silkscreen_path_id": "pcb_silkscreen_path_3",
"pcb_component_id": "pcb_component_0",
"layer": "top",
"route": [
{
"x": -0.8512047999998913,
"y": -0.726211400000011
},
{
"x": 0.9012427999999773,
"y": -0.726211400000011
}
],
"stroke_width": 0.1,
"subcircuit_id": "subcircuit_source_group_0",
"pcb_group_id": "pcb_group_0"
},
{
"type": "pcb_silkscreen_path",
"pcb_silkscreen_path_id": "pcb_silkscreen_path_4",
"pcb_component_id": "pcb_component_0",
"layer": "top",
"route": [
{
"x": -0.44676059999994777,
"y": 0.726211400000011
},
{
"x": -0.44676059999994777,
"y": -0.726211400000011
}
],
"stroke_width": 0.1,
"subcircuit_id": "subcircuit_source_group_0",
"pcb_group_id": "pcb_group_0"
},
{
"type": "pcb_port",
"pcb_port_id": "pcb_port_0",
"pcb_component_id": "pcb_component_0",
"layers": [
"top"
],
"subcircuit_id": "subcircuit_source_group_0",
"pcb_group_id": "pcb_group_0",
"x": -1.1725910000000113,
"y": 0,
"source_port_id": "source_port_0"
},
{
"type": "pcb_port",
"pcb_port_id": "pcb_port_1",
"pcb_component_id": "pcb_component_0",
"layers": [
"top"
],
"subcircuit_id": "subcircuit_source_group_0",
"pcb_group_id": "pcb_group_0",
"x": 1.1725910000000113,
"y": 0,
"source_port_id": "source_port_1"
},
{
"type": "cad_component",
"cad_component_id": "cad_component_0",
"position": {
"x": 0,
"y": 0,
"z": 0
},
"rotation": {
"x": 0,
"y": 0,
"z": 0
},
"pcb_component_id": "pcb_component_0",
"source_component_id": "source_component_0",
"model_obj_url": "https://modelcdn.tscircuit.com/easyeda_models/download?uuid=973acf8a660c48b1975f1ba1c890421a&pn=C57759&cachebust_origin="
}
]