summaryrefslogtreecommitdiff
path: root/keyboards/moonlander
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-04-25 02:38:35 +1000
committerGitHub <noreply@github.com>2023-04-25 02:38:35 +1000
commitf111bea3cda240b7c54bff2e12b5043b7b0797f7 (patch)
tree9fa3b3356f50e0b989231bf69da4ce00c18e85e0 /keyboards/moonlander
parent72d2be24f9bb1ab40a7a64447f2625c31b22a201 (diff)
Move miscellaneous layouts to data driven (#20516)
Diffstat (limited to 'keyboards/moonlander')
-rw-r--r--keyboards/moonlander/info.json89
-rw-r--r--keyboards/moonlander/moonlander.c2
-rw-r--r--keyboards/moonlander/moonlander.h24
3 files changed, 79 insertions, 36 deletions
diff --git a/keyboards/moonlander/info.json b/keyboards/moonlander/info.json
index c8b0133f47..fc09859f82 100644
--- a/keyboards/moonlander/info.json
+++ b/keyboards/moonlander/info.json
@@ -16,22 +16,89 @@
"layouts": {
"LAYOUT_moonlander": {
"layout": [
- {"x":0, "y":0.375}, {"x":1, "y":0.375}, {"x":2, "y":0.125}, {"x":3, "y":0}, {"x":4, "y":0.125}, {"x":5, "y":0.25}, {"x":6, "y":0.25},
- {"x":10, "y":0.25}, {"x":11, "y":0.25}, {"x":12, "y":0.125}, {"x":13, "y":0}, {"x":14, "y":0.125}, {"x":15, "y":0.375}, {"x":16, "y":0.375},
+ {"matrix": [0, 0], "x": 0, "y": 0.375},
+ {"matrix": [0, 1], "x": 1, "y": 0.375},
+ {"matrix": [0, 2], "x": 2, "y": 0.125},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0.125},
+ {"matrix": [0, 5], "x": 5, "y": 0.25},
+ {"matrix": [0, 6], "x": 6, "y": 0.25},
- {"x":0, "y":1.375}, {"x":1, "y":1.375}, {"x":2, "y":1.125}, {"x":3, "y":1}, {"x":4, "y":1.125}, {"x":5, "y":1.25}, {"x":6, "y":1.25},
- {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.125}, {"x":13, "y":1}, {"x":14, "y":1.125}, {"x":15, "y":1.375}, {"x":16, "y":1.375},
+ {"matrix": [6, 0], "x": 10, "y": 0.25},
+ {"matrix": [6, 1], "x": 11, "y": 0.25},
+ {"matrix": [6, 2], "x": 12, "y": 0.125},
+ {"matrix": [6, 3], "x": 13, "y": 0},
+ {"matrix": [6, 4], "x": 14, "y": 0.125},
+ {"matrix": [6, 5], "x": 15, "y": 0.375},
+ {"matrix": [6, 6], "x": 16, "y": 0.375},
- {"x":0, "y":2.375}, {"x":1, "y":2.375}, {"x":2, "y":2.125}, {"x":3, "y":2}, {"x":4, "y":2.125}, {"x":5, "y":2.25}, {"x":6, "y":2.25},
- {"x":10, "y":2.25}, {"x":11, "y":2.25}, {"x":12, "y":2.125}, {"x":13, "y":2}, {"x":14, "y":2.125}, {"x":15, "y":2.375}, {"x":16, "y":2.375},
+ {"matrix": [1, 0], "x": 0, "y": 1.375},
+ {"matrix": [1, 1], "x": 1, "y": 1.375},
+ {"matrix": [1, 2], "x": 2, "y": 1.125},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+ {"matrix": [1, 4], "x": 4, "y": 1.125},
+ {"matrix": [1, 5], "x": 5, "y": 1.25},
+ {"matrix": [1, 6], "x": 6, "y": 1.25},
- {"x":0, "y":3.375}, {"x":1, "y":3.375}, {"x":2, "y":3.125}, {"x":3, "y":3}, {"x":4, "y":3.125}, {"x":5, "y":3.25},
- {"x":11, "y":3.25}, {"x":12, "y":3.125}, {"x":13, "y":3}, {"x":14, "y":3.125}, {"x":15, "y":3.375}, {"x":16, "y":3.375},
+ {"matrix": [7, 0], "x": 10, "y": 1.25},
+ {"matrix": [7, 1], "x": 11, "y": 1.25},
+ {"matrix": [7, 2], "x": 12, "y": 1.125},
+ {"matrix": [7, 3], "x": 13, "y": 1},
+ {"matrix": [7, 4], "x": 14, "y": 1.125},
+ {"matrix": [7, 5], "x": 15, "y": 1.375},
+ {"matrix": [7, 6], "x": 16, "y": 1.375},
- {"x":0, "y":4.375}, {"x":1, "y":4.375}, {"x":2, "y":4.125}, {"x":3, "y":4}, {"x":4, "y":4.125}, {"x":5, "y":4.5, "w":2},
- {"x":10, "y":4.5, "w":2}, {"x":12, "y":4.125}, {"x":13, "y":4}, {"x":14, "y":4.125}, {"x":15, "y":4.375}, {"x":16, "y":4.375},
+ {"matrix": [2, 0], "x": 0, "y": 2.375},
+ {"matrix": [2, 1], "x": 1, "y": 2.375},
+ {"matrix": [2, 2], "x": 2, "y": 2.125},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+ {"matrix": [2, 4], "x": 4, "y": 2.125},
+ {"matrix": [2, 5], "x": 5, "y": 2.25},
+ {"matrix": [2, 6], "x": 6, "y": 2.25},
- {"x":5, "y":5.5, "h":1.5}, {"x":6, "y":5.5, "h":1.5}, {"x":7, "y":5.5, "h":1.5}, {"x":9, "y":5.5, "h":1.5}, {"x":10, "y":5.5, "h":1.5}, {"x":11, "y":5.5, "h":1.5}
+ {"matrix": [8, 0], "x": 10, "y": 2.25},
+ {"matrix": [8, 1], "x": 11, "y": 2.25},
+ {"matrix": [8, 2], "x": 12, "y": 2.125},
+ {"matrix": [8, 3], "x": 13, "y": 2},
+ {"matrix": [8, 4], "x": 14, "y": 2.125},
+ {"matrix": [8, 5], "x": 15, "y": 2.375},
+ {"matrix": [8, 6], "x": 16, "y": 2.375},
+
+ {"matrix": [3, 0], "x": 0, "y": 3.375},
+ {"matrix": [3, 1], "x": 1, "y": 3.375},
+ {"matrix": [3, 2], "x": 2, "y": 3.125},
+ {"matrix": [3, 3], "x": 3, "y": 3},
+ {"matrix": [3, 4], "x": 4, "y": 3.125},
+ {"matrix": [3, 5], "x": 5, "y": 3.25},
+
+ {"matrix": [9, 1], "x": 11, "y": 3.25},
+ {"matrix": [9, 2], "x": 12, "y": 3.125},
+ {"matrix": [9, 3], "x": 13, "y": 3},
+ {"matrix": [9, 4], "x": 14, "y": 3.125},
+ {"matrix": [9, 5], "x": 15, "y": 3.375},
+ {"matrix": [9, 6], "x": 16, "y": 3.375},
+
+ {"matrix": [4, 0], "x": 0, "y": 4.375},
+ {"matrix": [4, 1], "x": 1, "y": 4.375},
+ {"matrix": [4, 2], "x": 2, "y": 4.125},
+ {"matrix": [4, 3], "x": 3, "y": 4},
+ {"matrix": [4, 4], "x": 4, "y": 4.125},
+ {"matrix": [5, 3], "x": 5, "y": 4.5, "w": 2},
+
+ {"matrix": [11, 3], "x": 10, "y": 4.5, "w": 2},
+ {"matrix": [10, 2], "x": 12, "y": 4.125},
+ {"matrix": [10, 3], "x": 13, "y": 4},
+ {"matrix": [10, 4], "x": 14, "y": 4.125},
+ {"matrix": [10, 5], "x": 15, "y": 4.375},
+ {"matrix": [10, 6], "x": 16, "y": 4.375},
+
+ {"matrix": [5, 0], "x": 5, "y": 5.5, "h": 1.5},
+ {"matrix": [5, 1], "x": 6, "y": 5.5, "h": 1.5},
+ {"matrix": [5, 2], "x": 7, "y": 5.5, "h": 1.5},
+
+ {"matrix": [11, 4], "x": 9, "y": 5.5, "h": 1.5},
+ {"matrix": [11, 5], "x": 10, "y": 5.5, "h": 1.5},
+ {"matrix": [11, 6], "x": 11, "y": 5.5, "h": 1.5}
]
}
}
diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c
index 70bcd63152..e81c884adf 100644
--- a/keyboards/moonlander/moonlander.c
+++ b/keyboards/moonlander/moonlander.c
@@ -17,7 +17,7 @@
*/
-
+#include QMK_KEYBOARD_H
#include "moonlander.h"
keyboard_config_t keyboard_config;
diff --git a/keyboards/moonlander/moonlander.h b/keyboards/moonlander/moonlander.h
index 400c97be0d..f68b60379c 100644
--- a/keyboards/moonlander/moonlander.h
+++ b/keyboards/moonlander/moonlander.h
@@ -36,30 +36,6 @@ extern bool mcp23018_leds[];
// clang-format off
-#define LAYOUT_moonlander( \
- k00, k01, k02, k03, k04, k05, k06, k60, k61, k62, k63, k64, k65, k66, \
- k10, k11, k12, k13, k14, k15, k16, k70, k71, k72, k73, k74, k75, k76, \
- k20, k21, k22, k23, k24, k25, k26, k80, k81, k82, k83, k84, k85, k86, \
- k30, k31, k32, k33, k34, k35, k91, k92, k93, k94, k95, k96, \
- k40, k41, k42, k43, k44, k53, kb3, ka2, ka3, ka4, ka5, ka6, \
- k50, k51, k52, kb4, kb5, kb6 \
-) \
-{ \
- { k00, k01, k02, k03, k04, k05, k06 }, \
- { k10, k11, k12, k13, k14, k15, k16 }, \
- { k20, k21, k22, k23, k24, k25, k26 }, \
- { k30, k31, k32, k33, k34, k35, KC_NO }, \
- { k40, k41, k42, k43, k44, KC_NO, KC_NO }, \
- { k50, k51, k52, k53, KC_NO, KC_NO, KC_NO }, \
-\
- { k60, k61, k62, k63, k64, k65, k66 }, \
- { k70, k71, k72, k73, k74, k75, k76 }, \
- { k80, k81, k82, k83, k84, k85, k86 }, \
- { KC_NO, k91, k92, k93, k94, k95, k96 }, \
- { KC_NO, KC_NO, ka2, ka3, ka4, ka5, ka6 }, \
- { KC_NO, KC_NO, KC_NO, kb3, kb4, kb5, kb6 } \
-}
-
#define LED_LAYOUT_moonlander( \
l00, l01, l02, l03, l04, l05, l06, l60, l61, l62, l63, l64, l65, l66, \
l10, l11, l12, l13, l14, l15, l16, l70, l71, l72, l73, l74, l75, l76, \