Skip to content

Commit

Permalink
Added a design guide that covers how to convert a KLE layout into a f…
Browse files Browse the repository at this point in the history
…ull keyboard design.
  • Loading branch information
50an6xy06r6n committed Aug 2, 2021
1 parent ca190b2 commit cf0ed78
Show file tree
Hide file tree
Showing 57 changed files with 361 additions and 202 deletions.
20 changes: 10 additions & 10 deletions example_layouts/crkbd/crkbd.scad
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,26 @@ base_mcu_layout = [];
// TRRS Position(s)
base_trrs_layout = [];

// Stabilizer layout
// (extra_data = [key_size, left_offset, right_offset, switch_offset=0])
// (see stabilizer_spacing.scad for presets)
base_stab_layout = [];

// Via layout
// (extra_data = [via_width, via_length])
base_via_layout = [];

// Plate Layout (if different than PCB)
// (extra_data = component_type)
base_plate_layout = [];

// Whether to only use base_plate_layout to generate the plate footprint
use_plate_layout_only = false;

// Stabilizer layout
// (extra_data = [key_size, left_offset, right_offset, switch_offset=0])
// (see stabilizer_spacing.scad for presets)
base_stab_layout = [];

// Standoff hole layout
// Standoff layout
// (extra_data = [standoff_integration_override, standoff_attachment_override])
base_standoff_layout = [];

// Via layout
// (extra_data = [via_width, via_length])
base_via_layout = [];

// Whether to flip the layout
invert_layout_flag = false;

Expand Down
22 changes: 3 additions & 19 deletions example_layouts/eggcat/eggcat.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"name": "Double Duck Yolk Matrix",
"name": "EggCat Siamese Kitten Matrix",
"switchMount": "cherry",
"plate": true
},
Expand Down Expand Up @@ -70,15 +70,7 @@
},
"1,3",
{
"x": 2
},
"1,6",
{
"x": 3
},
"5,6",
{
"x": 2
"x": 9
},
"5,3",
{
Expand Down Expand Up @@ -134,15 +126,7 @@
},
"2,3",
{
"x": 2
},
"2,6",
{
"x": 3
},
"6,6",
{
"x": 2
"x": 9
},
"6,3",
{
Expand Down
102 changes: 52 additions & 50 deletions example_layouts/eggcat/eggcat.scad
Original file line number Diff line number Diff line change
@@ -1,92 +1,101 @@
include <parameters.scad>
include <stabilizer_spacing.scad>

/* [Layout Values] */
/* Layout Format (each key):
/* Layout Format (each key):
[
[ // Location Data
[x_location, y_location],
key_size,
[rotation, rotation_x, rotation_y],
],
],
[ // Borders
top_border,
bottom_border,
left_border,
left_border,
right_border
],
extra_data // Extra data (depending on component type)
]
*/

// Keyswitch Layout
// Keyswitch Layout
// (extra_data = rotate_column)
base_switch_layout = [
[[[0,0.125]],[0,1,0,2]],
[[[0,1.125]],[1,1,0,1]],
[[[0,2.125]],[1,1,0,1]],
[[[0,3.125]],[1,0,0,0]],
[[[1,0]],[0,1,0,0]],
[[[1,1]]],
[[[1,2]]],
[[[1,3]],[1,0,2,2]],
[[[2,0.125]],[0,1,2,2]],
[[[2,1.125]]],
[[[2,2.125]]],
[[[2,3.125]],[1,0,0,0]],
[[[3,0]],[0,1,0,0]],
[[[3,1]]],
[[[3,2]]],
[[[3,3]],[1,0,2,2]],
[[[4,0.125]],[0,1,2,0]],
[[[4,1.125]]],
[[[4,2.125]]],
[[[4,3.125]],[1,0,0,0]],
[[[5,0.25]],[0,1,2,0]],
[[[5,1.25]]],
[[[5,2.25]],[1,15*mm,2,1]],
[[[4.875,4.625],1.5,[60,4.875,4.625]],[15*mm,1,0,17.11*mm],true],
[[[4.875,5.625],1.5,[60,4.875,4.625]],[1,0,0,17.11*mm],true],
[[[0,0.125],1,[0,0,0]],[0,1,0,2],false],
[[[0,1.125],1,[0,0,0]],[1,1,0,1],false],
[[[0,2.125],1,[0,0,0]],[1,1,0,1],false],
[[[0,3.125],1,[0,0,0]],[1,0,0,0],false],
[[[1,0],1,[0,0,0]],[0,1,0,0],false],
[[[1,1],1,[0,0,0]],[1,1,1,1],false],
[[[1,2],1,[0,0,0]],[1,1,1,1],false],
[[[1,3],1,[0,0,0]],[1,0,2,2],false],
[[[2,0.125],1,[0,0,0]],[0,1,2,2],false],
[[[2,1.125],1,[0,0,0]],[1,1,1,1],false],
[[[2,2.125],1,[0,0,0]],[1,1,1,1],false],
[[[2,3.125],1,[0,0,0]],[1,0,0,0],false],
[[[3,0],1,[0,0,0]],[0,1,0,0],false],
[[[3,1],1,[0,0,0]],[1,1,1,1],false],
[[[3,2],1,[0,0,0]],[1,1,1,1],false],
[[[3,3],1,[0,0,0]],[1,0,2,2],false],
[[[4,0.125],1,[0,0,0]],[0,1,2,0],false],
[[[4,1.125],1,[0,0,0]],[1,1,1,1],false],
[[[4,2.125],1,[0,0,0]],[1,1,1,0],false],
[[[4,3.125],1,[0,0,0]],[1,0,0,0],false],
[[[5,0.25],1,[0,0,0]],[0,1,2,0],false],
[[[5,1.25],1,[0,0,0]],[1,1,2,0],false],
[[[5,2.25],1,[0,0,0]],[1,1+15*mm,2,0],false],
[[[4.875,4.625],1.5,[60,4.875,4.625]],[30*mm,1,0.25*unit*mm,17.11*mm],true],
[[[4.875,5.625],1.5,[60,4.875,4.625]],[1,0,0.25*unit*mm,17.11*mm],true],
];

// MCU Position(s)
base_mcu_layout = [
[[[6,0.5],mcu_h_unit_size],[0,0,3,0]],
[[[6,0.5],mcu_h_unit_size],[0,0,h_border_width,0]],
];

// TRRS Position(s)
base_trrs_layout = [
[[[6.5,2.5],1,[-90,7,3]],[0,0.5*h_unit,0,5.97]],
[[[6.5,2.5],1,[-90,7,3]],[0,h_unit/2+h_border_width,0,5.97]],
];

// Stabilizer layout
// (extra_data = [key_size, left_offset, right_offset, switch_offset=0])
// (see stabilizer_spacing.scad for presets)
base_stab_layout = [];

// Via layout
// (extra_data = [via_width, via_length])
base_via_layout = [
[[[5.5,3]]]
];

// Plate Layout (if different than PCB)
// (extra_data = component_type)
base_plate_layout = [
concat(
slice(base_switch_layout, [0,-2]),
[
[[[6,0.5],mcu_h_unit_size],[-2,0,3,0], "mcu"],
[[[6.5,2.5],1,[-90,7,3]],[0,0.5*h_unit,0,5.97], "trrs"]
]
slice(base_switch_layout, [0,-2], ["switch"]),
[[[[6,0.5],mcu_h_unit_size],[-2,0,h_border_width,0], ["mcu"]]],
slice(base_trrs_layout, [0,0], ["trrs"])
),
[
[[[4.875,4.625],1.5,[60,4.875,4.625]],[30*mm,1,0.25*unit*mm,17.11*mm]],
[[[4.875,5.625],1.5,[60,4.875,4.625]],[1,0,0.25*unit*mm,17.11*mm]],
]
slice(base_switch_layout, [-2,0], ["switch"])
];

// Whether to only use base_plate_layout to generate the plate footprint
use_plate_layout_only = true;
use_plate_layout_only = false;

// Standoff layout
// (extra_data = [standoff_integration, standoff_attachment])
// Standoff layout
// (extra_data = [standoff_integration_override, standoff_attachment_override])
base_standoff_layout = [
// PCB-Plate standoffs
[[[0.5,0.125]]],
[[[0.5,3]]],
[[[2.5,1.5]]],
[[[3.5,3]]],
[[[4.5,0.25]]],
[[[4.875,5.125],1.5,[60,4.875,4.625]], [0,0,0,0]],
[[[6,2.5]]],
// PCB-Backplate standoffs
[[[-0.5,-0.375]],[0,0,0,0],["plate", "backplate"]],
[[[-0.5,3.625]],[0,0,0,0],["plate", "backplate"]],
[[[4,3.625]],[0,0,0,0],["plate", "backplate"]],
Expand All @@ -96,15 +105,8 @@ base_standoff_layout = [
[[[7,0]],[0,0,0,0],["plate", "backplate"]],
];

// Via layout
// (extra_data = [via_width, via_length])
base_via_layout = [
[[[5.5,3]]]
];

// Whether to flip the layout
invert_layout_flag = false;

// Whether the layout is staggered-row or staggered-column
layout_type = "column"; // [column, row]

22 changes: 11 additions & 11 deletions example_layouts/jd40/jd40.scad
Original file line number Diff line number Diff line change
Expand Up @@ -70,28 +70,28 @@ base_mcu_layout = [];
// TRRS Position(s)
base_trrs_layout = [];

// Plate Layout (if different than PCB)
// (extra_data = component_type)
base_plate_layout = [];

// Whether to only use base_plate_layout to generate the plate footprint
use_plate_layout_only = false;

// Stabilizer layout
// (extra_data = [key_size, left_offset, right_offset, switch_offset=0])
// (see stabilizer_spacing.scad for presets)
base_stab_layout = [
[[[3.25,3],6.25,[0,0,0]],[1,1,1,1],6_25u],
];

// Standoff hole layout
// (extra_data = [standoff_integration_override, standoff_attachment_override])
base_standoff_layout = [];

// Via layout
// (extra_data = [via_width, via_length])
base_via_layout = [];

// Plate Layout (if different than PCB)
// (extra_data = component_type)
base_plate_layout = [];

// Whether to only use base_plate_layout to generate the plate footprint
use_plate_layout_only = false;

// Standoff layout
// (extra_data = [standoff_integration_override, standoff_attachment_override])
base_standoff_layout = [];

// Whether to flip the layout
invert_layout_flag = false;

Expand Down
22 changes: 11 additions & 11 deletions example_layouts/numpad/numpad.scad
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ base_mcu_layout = [];
// TRRS Position(s)
base_trrs_layout = [];

// Plate Layout (if different than PCB)
// (extra_data = component_type)
base_plate_layout = [];

// Whether to only use base_plate_layout to generate the plate footprint
use_plate_layout_only = false;

// Stabilizer layout
// (extra_data = [key_size, left_offset, right_offset, switch_offset=0])
// (see stabilizer_spacing.scad for presets)
Expand All @@ -63,14 +56,21 @@ base_stab_layout = [
[[[4,3],2,[-90,4,3]],[1,1,1,1],2u],
];

// Standoff hole layout
// (extra_data = [standoff_integration_override, standoff_attachment_override])
base_standoff_layout = [];

// Via layout
// (extra_data = [via_width, via_length])
base_via_layout = [];

// Plate Layout (if different than PCB)
// (extra_data = component_type)
base_plate_layout = [];

// Whether to only use base_plate_layout to generate the plate footprint
use_plate_layout_only = false;

// Standoff layout
// (extra_data = [standoff_integration_override, standoff_attachment_override])
base_standoff_layout = [];

// Whether to flip the layout
invert_layout_flag = false;

Expand Down

0 comments on commit cf0ed78

Please sign in to comment.