summaryrefslogtreecommitdiff
path: root/keyboards/handwired/lagrange
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-04-12 13:42:51 +1000
committerGitHub <noreply@github.com>2023-04-12 13:42:51 +1000
commit5bd68e3695a82ff504c358c33445b4530c2a327f (patch)
tree10b245757dcb4f2c3c07796671ed8d284e5f5d6f /keyboards/handwired/lagrange
parent941e159a28f1bdbdd913654c4f9a14291f8d5299 (diff)
Move single `LAYOUT`s to data driven (#20365)
Diffstat (limited to 'keyboards/handwired/lagrange')
-rw-r--r--keyboards/handwired/lagrange/info.json147
-rw-r--r--keyboards/handwired/lagrange/lagrange.h26
2 files changed, 77 insertions, 96 deletions
diff --git a/keyboards/handwired/lagrange/info.json b/keyboards/handwired/lagrange/info.json
index 1141183e18..243f9a5d7b 100644
--- a/keyboards/handwired/lagrange/info.json
+++ b/keyboards/handwired/lagrange/info.json
@@ -30,82 +30,89 @@
"layouts": {
"LAYOUT": {
"layout": [
- {"x":0, "y":0.75, "w":1.5},
- {"x":1.5, "y":0.75},
- {"x":2.5, "y":0.375},
- {"x":3.5, "y":0},
- {"x":4.5, "y":0.5},
- {"x":5.5, "y":0.5},
- {"x":12.5, "y":0.5},
- {"x":13.5, "y":0.5},
- {"x":14.5, "y":0},
- {"x":15.5, "y":0.375},
- {"x":16.5, "y":0.75},
- {"x":17.5, "y":0.75, "w":1.5},
+ {"matrix": [0, 0], "x": 0, "y": 0.75, "w": 1.5},
+ {"matrix": [0, 1], "x": 1.5, "y": 0.75},
+ {"matrix": [0, 2], "x": 2.5, "y": 0.375},
+ {"matrix": [0, 3], "x": 3.5, "y": 0},
+ {"matrix": [0, 4], "x": 4.5, "y": 0.5},
+ {"matrix": [0, 5], "x": 5.5, "y": 0.5},
- {"x":0, "y":1.75, "w":1.5},
- {"x":1.5, "y":1.75},
- {"x":2.5, "y":1.375},
- {"x":3.5, "y":1},
- {"x":4.5, "y":1.5},
- {"x":5.5, "y":1.5},
- {"x":12.5, "y":1.5},
- {"x":13.5, "y":1.5},
- {"x":14.5, "y":1},
- {"x":15.5, "y":1.375},
- {"x":16.5, "y":1.75},
- {"x":17.5, "y":1.75, "w":1.5},
+ {"matrix": [7, 5], "x": 12.5, "y": 0.5},
+ {"matrix": [7, 4], "x": 13.5, "y": 0.5},
+ {"matrix": [7, 3], "x": 14.5, "y": 0},
+ {"matrix": [7, 2], "x": 15.5, "y": 0.375},
+ {"matrix": [7, 1], "x": 16.5, "y": 0.75},
+ {"matrix": [7, 0], "x": 17.5, "y": 0.75, "w": 1.5},
- {"x":0, "y":2.75, "w":1.5},
- {"x":1.5, "y":2.75},
- {"x":2.5, "y":2.375},
- {"x":3.5, "y":2},
- {"x":4.5, "y":2.5},
- {"x":5.5, "y":2.5},
- {"x":12.5, "y":2.5},
- {"x":13.5, "y":2.5},
- {"x":14.5, "y":2},
- {"x":15.5, "y":2.375},
- {"x":16.5, "y":2.75},
- {"x":17.5, "y":2.75, "w":1.5},
+ {"matrix": [1, 0], "x": 0, "y": 1.75, "w": 1.5},
+ {"matrix": [1, 1], "x": 1.5, "y": 1.75},
+ {"matrix": [1, 2], "x": 2.5, "y": 1.375},
+ {"matrix": [1, 3], "x": 3.5, "y": 1},
+ {"matrix": [1, 4], "x": 4.5, "y": 1.5},
+ {"matrix": [1, 5], "x": 5.5, "y": 1.5},
- {"x":0, "y":3.75, "w":1.5},
- {"x":1.5, "y":3.75},
- {"x":2.5, "y":3.375},
- {"x":3.5, "y":3},
- {"x":4.5, "y":3.5},
- {"x":5.5, "y":3.5},
- {"x":12.5, "y":3.5},
- {"x":13.5, "y":3.5},
- {"x":14.5, "y":3},
- {"x":15.5, "y":3.375},
- {"x":16.5, "y":3.75},
- {"x":17.5, "y":3.75, "w":1.5},
+ {"matrix": [8, 5], "x": 12.5, "y": 1.5},
+ {"matrix": [8, 4], "x": 13.5, "y": 1.5},
+ {"matrix": [8, 3], "x": 14.5, "y": 1},
+ {"matrix": [8, 2], "x": 15.5, "y": 1.375},
+ {"matrix": [8, 1], "x": 16.5, "y": 1.75},
+ {"matrix": [8, 0], "x": 17.5, "y": 1.75, "w": 1.5},
- {"x":0, "y":4.75, "w":1.5},
- {"x":2.5, "y":4.375},
- {"x":3.5, "y":4},
- {"x":5, "y":5, "h":1.25},
- {"x":6, "y":5, "h":1.5},
- {"x":7, "y":5, "h":1.5},
- {"x":8, "y":5.5},
- {"x":10, "y":5.5},
- {"x":11, "y":5, "h":1.5},
- {"x":12, "y":5, "h":1.5},
- {"x":13, "y":5, "h":1.25},
- {"x":14.5, "y":4},
- {"x":15.5, "y":4.5},
- {"x":17.5, "y":4.75, "w":1.5},
+ {"matrix": [2, 0], "x": 0, "y": 2.75, "w": 1.5},
+ {"matrix": [2, 1], "x": 1.5, "y": 2.75},
+ {"matrix": [2, 2], "x": 2.5, "y": 2.375},
+ {"matrix": [2, 3], "x": 3.5, "y": 2},
+ {"matrix": [2, 4], "x": 4.5, "y": 2.5},
+ {"matrix": [2, 5], "x": 5.5, "y": 2.5},
- {"x":5, "y":7},
- {"x":6, "y":6.5},
- {"x":7, "y":7},
- {"x":11, "y":7},
- {"x":12, "y":6.5},
- {"x":13, "y":7},
+ {"matrix": [9, 5], "x": 12.5, "y": 2.5},
+ {"matrix": [9, 4], "x": 13.5, "y": 2.5},
+ {"matrix": [9, 3], "x": 14.5, "y": 2},
+ {"matrix": [9, 2], "x": 15.5, "y": 2.375},
+ {"matrix": [9, 1], "x": 16.5, "y": 2.75},
+ {"matrix": [9, 0], "x": 17.5, "y": 2.75, "w": 1.5},
- {"x":6, "y":7.5},
- {"x":12, "y":7.5}
+ {"matrix": [3, 0], "x": 0, "y": 3.75, "w": 1.5},
+ {"matrix": [3, 1], "x": 1.5, "y": 3.75},
+ {"matrix": [3, 2], "x": 2.5, "y": 3.375},
+ {"matrix": [3, 3], "x": 3.5, "y": 3},
+ {"matrix": [3, 4], "x": 4.5, "y": 3.5},
+ {"matrix": [3, 5], "x": 5.5, "y": 3.5},
+
+ {"matrix": [10, 5], "x": 12.5, "y": 3.5},
+ {"matrix": [10, 4], "x": 13.5, "y": 3.5},
+ {"matrix": [10, 3], "x": 14.5, "y": 3},
+ {"matrix": [10, 2], "x": 15.5, "y": 3.375},
+ {"matrix": [10, 1], "x": 16.5, "y": 3.75},
+ {"matrix": [10, 0], "x": 17.5, "y": 3.75, "w": 1.5},
+
+ {"matrix": [4, 0], "x": 0, "y": 4.75, "w": 1.5},
+ {"matrix": [4, 2], "x": 2.5, "y": 4.375},
+ {"matrix": [4, 3], "x": 3.5, "y": 4},
+ {"matrix": [4, 4], "x": 5, "y": 5, "h": 1.25},
+ {"matrix": [4, 5], "x": 6, "y": 5, "h": 1.5},
+ {"matrix": [5, 5], "x": 7, "y": 5, "h": 1.5},
+ {"matrix": [6, 5], "x": 8, "y": 5.5},
+
+ {"matrix": [13, 5], "x": 10, "y": 5.5},
+ {"matrix": [12, 5], "x": 11, "y": 5, "h": 1.5},
+ {"matrix": [11, 5], "x": 12, "y": 5, "h": 1.5},
+ {"matrix": [11, 4], "x": 13, "y": 5, "h": 1.25},
+ {"matrix": [11, 3], "x": 14.5, "y": 4},
+ {"matrix": [11, 2], "x": 15.5, "y": 4.5},
+ {"matrix": [11, 0], "x": 17.5, "y": 4.75, "w": 1.5},
+
+ {"matrix": [5, 3], "x": 5, "y": 7},
+ {"matrix": [5, 4], "x": 6, "y": 6.5},
+ {"matrix": [6, 4], "x": 7, "y": 7},
+
+ {"matrix": [13, 4], "x": 11, "y": 7},
+ {"matrix": [12, 4], "x": 12, "y": 6.5},
+ {"matrix": [12, 3], "x": 13, "y": 7},
+
+ {"matrix": [6, 3], "x": 6, "y": 7.5},
+
+ {"matrix": [13, 3], "x": 12, "y": 7.5}
]
}
}
diff --git a/keyboards/handwired/lagrange/lagrange.h b/keyboards/handwired/lagrange/lagrange.h
index 6f808ba8e4..60f82c11b2 100644
--- a/keyboards/handwired/lagrange/lagrange.h
+++ b/keyboards/handwired/lagrange/lagrange.h
@@ -25,29 +25,3 @@
#define SPI_SCK_PIN B1
#define SPI_MOSI_PIN B2
#define SPI_MISO_PIN B3
-
-#define LAYOUT( \
- l00, l01, l02, l03, l04, l05, r05, r04, r03, r02, r01, r00, \
- l10, l11, l12, l13, l14, l15, r15, r14, r13, r12, r11, r10, \
- l20, l21, l22, l23, l24, l25, r25, r24, r23, r22, r21, r20, \
- l30, l31, l32, l33, l34, l35, r35, r34, r33, r32, r31, r30, \
- l40, l42, l43, l44, l45, l46, l47, r47, r46, r45, r44, r43, r42, r40, \
- l50, l51, l52, r52, r51, r50, \
- l70, r70) \
- { \
- {l00, l01, l02, l03, l04, l05}, \
- {l10, l11, l12, l13, l14, l15}, \
- {l20, l21, l22, l23, l24, l25}, \
- {l30, l31, l32, l33, l34, l35}, \
- {l40, KC_NO, l42, l43, l44, l45}, \
- {KC_NO, KC_NO, KC_NO, l50, l51, l46}, \
- {KC_NO, KC_NO, KC_NO, l70, l52, l47}, \
- \
- {r00, r01, r02, r03, r04, r05}, \
- {r10, r11, r12, r13, r14, r15}, \
- {r20, r21, r22, r23, r24, r25}, \
- {r30, r31, r32, r33, r34, r35}, \
- {r40, KC_NO, r42, r43, r44, r45}, \
- {KC_NO, KC_NO, KC_NO, r50, r51, r46}, \
- {KC_NO, KC_NO, KC_NO, r70, r52, r47} \
- }