summaryrefslogtreecommitdiff
path: root/keyboards/yanghu/unicorne
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-04-01 13:09:53 +1100
committerGitHub <noreply@github.com>2023-04-01 13:09:53 +1100
commite40b6ca3b05e50253c3f6bbc08673e1720ddd9be (patch)
tree28ff78699bb1ff96997be7d097eaad2ec4843785 /keyboards/yanghu/unicorne
parent297779385fd53e93c33861e2d3107cb88efbde81 (diff)
Move split layouts to data driven (#20290)
Diffstat (limited to 'keyboards/yanghu/unicorne')
-rw-r--r--keyboards/yanghu/unicorne/info.json88
-rw-r--r--keyboards/yanghu/unicorne/unicorne.h25
2 files changed, 44 insertions, 69 deletions
diff --git a/keyboards/yanghu/unicorne/info.json b/keyboards/yanghu/unicorne/info.json
index 3365ea7cf5..78aaa10e72 100644
--- a/keyboards/yanghu/unicorne/info.json
+++ b/keyboards/yanghu/unicorne/info.json
@@ -28,57 +28,57 @@
"layouts": {
"LAYOUT_split_3x6_4": {
"layout": [
- {"label":"Tab", "x":0, "y":0.8},
- {"label":"Q", "x":1, "y":0.8},
- {"label":"W", "x":2, "y":0.1},
- {"label":"E", "x":3, "y":0},
- {"label":"R", "x":4, "y":0.1},
- {"label":"T", "x":5, "y":0.2},
+ {"matrix": [0, 0], "x": 0, "y": 0.8},
+ {"matrix": [0, 1], "x": 1, "y": 0.8},
+ {"matrix": [0, 2], "x": 2, "y": 0.1},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0.1},
+ {"matrix": [0, 5], "x": 5, "y": 0.2},
- {"label":"Y", "x":9, "y":0.2},
- {"label":"U", "x":10, "y":0.1},
- {"label":"I", "x":11, "y":0},
- {"label":"O", "x":12, "y":0.1},
- {"label":"P", "x":13, "y":0.8},
- {"label":"Back Space", "x":14, "y":0.8},
+ {"matrix": [0, 6], "x": 9, "y": 0.2},
+ {"matrix": [0, 7], "x": 10, "y": 0.1},
+ {"matrix": [0, 8], "x": 11, "y": 0},
+ {"matrix": [0, 9], "x": 12, "y": 0.1},
+ {"matrix": [0, 10], "x": 13, "y": 0.8},
+ {"matrix": [0, 11], "x": 14, "y": 0.8},
- {"label":"Ctrl / Esc", "x":0, "y":1.8},
- {"label":"A", "x":1, "y":1.8},
- {"label":"S", "x":2, "y":1.1},
- {"label":"D", "x":3, "y":1},
- {"label":"F", "x":4, "y":1.1},
- {"label":"G", "x":5, "y":1.2},
+ {"matrix": [1, 0], "x": 0, "y": 1.8},
+ {"matrix": [1, 1], "x": 1, "y": 1.8},
+ {"matrix": [1, 2], "x": 2, "y": 1.1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+ {"matrix": [1, 4], "x": 4, "y": 1.1},
+ {"matrix": [1, 5], "x": 5, "y": 1.2},
- {"label":"H", "x":9, "y":1.2},
- {"label":"J", "x":10, "y":1.1},
- {"label":"K", "x":11, "y":1},
- {"label":"L", "x":12, "y":1.1},
- {"label":";", "x":13, "y":1.8},
- {"label":"'", "x":14, "y":1.8},
+ {"matrix": [1, 6], "x": 9, "y": 1.2},
+ {"matrix": [1, 7], "x": 10, "y": 1.1},
+ {"matrix": [1, 8], "x": 11, "y": 1},
+ {"matrix": [1, 9], "x": 12, "y": 1.1},
+ {"matrix": [1, 10], "x": 13, "y": 1.8},
+ {"matrix": [1, 11], "x": 14, "y": 1.8},
- {"label":"Shift", "x":0, "y":2.8},
- {"label":"Z", "x":1, "y":2.8},
- {"label":"X", "x":2, "y":2.1},
- {"label":"C", "x":3, "y":2},
- {"label":"V", "x":4, "y":2.1},
- {"label":"B", "x":5, "y":2.2},
+ {"matrix": [2, 0], "x": 0, "y": 2.8},
+ {"matrix": [2, 1], "x": 1, "y": 2.8},
+ {"matrix": [2, 2], "x": 2, "y": 2.1},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+ {"matrix": [2, 4], "x": 4, "y": 2.1},
+ {"matrix": [2, 5], "x": 5, "y": 2.2},
- {"label":"N", "x":9, "y":2.2},
- {"label":"M", "x":10, "y":2.1},
- {"label":",", "x":11, "y":2},
- {"label":".", "x":12, "y":2.1},
- {"label":"/", "x":13, "y":2.8},
- {"label":"Shift / Enter", "x":14, "y":2.8},
+ {"matrix": [2, 6], "x": 9, "y": 2.2},
+ {"matrix": [2, 7], "x": 10, "y": 2.1},
+ {"matrix": [2, 8], "x": 11, "y": 2},
+ {"matrix": [2, 9], "x": 12, "y": 2.1},
+ {"matrix": [2, 10], "x": 13, "y": 2.8},
+ {"matrix": [2, 11], "x": 14, "y": 2.8},
- {"label":"Ctrl", "x":3, "y":3.7},
- {"label":"Alt", "x":4, "y":3.7},
- {"label":"Lower", "x":5, "y":3.7},
- {"label":"Enter", "x":6, "y":3.2, "h":1.5},
+ {"matrix": [3, 2], "x": 3, "y": 3.7},
+ {"matrix": [3, 3], "x": 4, "y": 3.7},
+ {"matrix": [3, 4], "x": 5, "y": 3.7},
+ {"matrix": [3, 5], "x": 6, "y": 3.2, "h": 1.5},
- {"label":"Backspace", "x":8, "y":3.2, "h":1.5},
- {"label":"Space", "x":9, "y":3.7},
- {"label":"Raise", "x":10, "y":3.7},
- {"label":"RGUI", "x":11, "y":3.7}
+ {"matrix": [3, 6], "x": 8, "y": 3.2, "h": 1.5},
+ {"matrix": [3, 7], "x": 9, "y": 3.7},
+ {"matrix": [3, 8], "x": 10, "y": 3.7},
+ {"matrix": [3, 9], "x": 11, "y": 3.7}
]
}
}
diff --git a/keyboards/yanghu/unicorne/unicorne.h b/keyboards/yanghu/unicorne/unicorne.h
index f0b5685f1d..6f89e393a7 100644
--- a/keyboards/yanghu/unicorne/unicorne.h
+++ b/keyboards/yanghu/unicorne/unicorne.h
@@ -23,28 +23,3 @@ void oled_render_capslock(bool caps_on);
void oled_render_mods(void);
void oled_render_keylog(void);
#endif
-/* This a shortcut to help you visually see your layout.
- *
- * The first section contains all of the arguments representing the physical
- * layout of the board and position of the keys.
- *
- * The second converts the arguments into a two-dimensional array which
- * represents the switch matrix.
- */
-
-// clang-format off
-#define LAYOUT_split_3x6_4( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
- K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
- K30, K31, K32, K33, K34, K35, K36, K37 \
-) \
-{ \
- { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \
- { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \
- { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \
- { KC_NO, KC_NO, K30, K31, K32, K33, K34, K35, K36, K37, KC_NO, KC_NO} \
-}
-// clang-format on
-
-#define LAYOUT LAYOUT_split_3x6_4