Commit 7d2f360e71be

Vincent Demeester <vincent@sbr.pm>
2025-11-21 22:40:56
feat(keyboards): Add visual styling for unused keys in keymaps
- Improve keymap readability by dimming empty key positions - Distinguish unused keys with darker fill and dashed borders - Exclude functional glyph-based keys from unused styling Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 64b1084
Changed files (2)
keyboards
keyboards/keymap-drawer/config.yaml
@@ -117,6 +117,15 @@ draw_config:
         fill: #7b7e81;
     }
 
+    /* styling for unused/empty keys (XXXXXXX, KC_NO) */
+    /* Target keys that have neither text nor glyph (use) elements */
+    g.key:not(:has(text)):not(:has(use)) rect.key {
+        fill: #0d1117;
+        stroke: #30363d;
+        stroke-dasharray: 2, 2;
+        opacity: 0.5;
+    }
+
     /* styling for combo dendrons */
     path.combo {
         stroke-width: 1;
keyboards/moonlander.svg
@@ -193,6 +193,15 @@ text.trans {
     fill: #7b7e81;
 }
 
+/* styling for unused/empty keys (XXXXXXX, KC_NO) */
+/* Target keys that have neither text nor glyph (use) elements */
+g.key:not(:has(text)):not(:has(use)) rect.key {
+    fill: #0d1117;
+    stroke: #30363d;
+    stroke-dasharray: 2, 2;
+    opacity: 0.5;
+}
+
 /* styling for combo dendrons */
 path.combo {
     stroke-width: 1;