From 61b39b701a9c498e103038d844ca7eca168221b3 Mon Sep 17 00:00:00 2001 From: JONATHAN DOVE Date: Sun, 20 Feb 2022 19:36:11 -0500 Subject: [PATCH] Add Key Bump for Layouts --- src/key.scad | 8 ++++++++ src/settings.scad | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/key.scad b/src/key.scad index 15768ba..ec9c2d7 100644 --- a/src/key.scad +++ b/src/key.scad @@ -177,6 +177,14 @@ module inner_shape(extra_wall_thickness = 0, extra_keytop_thickness = 0) { // additive objects at the top of the key module additive_features(inset) { top_of_key() { + // Allow for key bump in layout + if ($layout_key_bump) { + for (layout_bump_key = $layout_bump_keys){ + if (str($legends[0][0]) == layout_bump_key){ + keybump($key_bump_depth, $key_bump_edge); + } + } + } if($key_bump) keybump($key_bump_depth, $key_bump_edge); if(!inset && $children > 0) color($secondary_color) children(); } diff --git a/src/settings.scad b/src/settings.scad index 29da524..cf83c66 100644 --- a/src/settings.scad +++ b/src/settings.scad @@ -136,6 +136,8 @@ $minkowski_radius = .33; //insert locating bump $key_bump = false; +$layout_key_bump = false; +$layout_bump_keys = ["F","f","J","j"]; //height of the location bump from the top surface of the key $key_bump_depth = 0.5; //distance to move the bump from the front edge of the key