summaryrefslogtreecommitdiffstats
path: root/keyboards/takashicompany/minizone
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/takashicompany/minizone
parent941e159a28f1bdbdd913654c4f9a14291f8d5299 (diff)
Move single `LAYOUT`s to data driven (#20365)
Diffstat (limited to 'keyboards/takashicompany/minizone')
-rw-r--r--keyboards/takashicompany/minizone/info.json80
-rw-r--r--keyboards/takashicompany/minizone/minizone.c2
-rw-r--r--keyboards/takashicompany/minizone/minizone.h30
3 files changed, 43 insertions, 69 deletions
diff --git a/keyboards/takashicompany/minizone/info.json b/keyboards/takashicompany/minizone/info.json
index c591487e7b..806a255bcb 100644
--- a/keyboards/takashicompany/minizone/info.json
+++ b/keyboards/takashicompany/minizone/info.json
@@ -21,47 +21,51 @@
"layouts": {
"LAYOUT": {
"layout": [
- { "x": 0, "y": 0.42, "w": 0.84, "h": 0.84 },
- { "x": 0.84, "y": 0.21, "w": 0.84, "h": 0.84 },
- { "x": 1.68, "y": 0, "w": 0.84, "h": 0.84 },
- { "x": 2.52, "y": 0.21, "w": 0.84, "h": 0.84 },
- { "x": 3.36, "y": 0.42, "w": 0.84, "h": 0.84 },
- { "x": 5.88, "y": 0.42, "w": 0.84, "h": 0.84 },
- { "x": 6.72, "y": 0.21, "w": 0.84, "h": 0.84 },
- { "x": 7.56, "y": 0, "w": 0.84, "h": 0.84 },
- { "x": 8.4, "y": 0.21, "w": 0.84, "h": 0.84 },
- { "x": 9.24, "y": 0.42, "w": 0.84, "h": 0.84 },
+ {"matrix": [0, 0], "x": 0, "y": 0.42, "w": 0.84, "h": 0.84},
+ {"matrix": [0, 1], "x": 0.84, "y": 0.21, "w": 0.84, "h": 0.84},
+ {"matrix": [0, 2], "x": 1.68, "y": 0, "w": 0.84, "h": 0.84},
+ {"matrix": [0, 3], "x": 2.52, "y": 0.21, "w": 0.84, "h": 0.84},
+ {"matrix": [0, 4], "x": 3.36, "y": 0.42, "w": 0.84, "h": 0.84},
- { "x": 0, "y": 1.26, "w": 0.84, "h": 0.84 },
- { "x": 0.84, "y": 1.05, "w": 0.84, "h": 0.84 },
- { "x": 1.68, "y": 0.84, "w": 0.84, "h": 0.84 },
- { "x": 2.52, "y": 1.05, "w": 0.84, "h": 0.84 },
- { "x": 3.36, "y": 1.26, "w": 0.84, "h": 0.84 },
- { "x": 5.88, "y": 1.26, "w": 0.84, "h": 0.84 },
- { "x": 6.72, "y": 1.05, "w": 0.84, "h": 0.84 },
- { "x": 7.56, "y": 0.84, "w": 0.84, "h": 0.84 },
- { "x": 8.4, "y": 1.05, "w": 0.84, "h": 0.84 },
- { "x": 9.24, "y": 1.26, "w": 0.84, "h": 0.84 },
+ {"matrix": [0, 5], "x": 5.88, "y": 0.42, "w": 0.84, "h": 0.84},
+ {"matrix": [0, 6], "x": 6.72, "y": 0.21, "w": 0.84, "h": 0.84},
+ {"matrix": [1, 0], "x": 7.56, "y": 0, "w": 0.84, "h": 0.84},
+ {"matrix": [1, 1], "x": 8.4, "y": 0.21, "w": 0.84, "h": 0.84},
+ {"matrix": [1, 2], "x": 9.24, "y": 0.42, "w": 0.84, "h": 0.84},
- { "x": 0, "y": 2.1, "w": 0.84, "h": 0.84 },
- { "x": 0.84, "y": 1.89, "w": 0.84, "h": 0.84 },
- { "x": 1.68, "y": 1.68, "w": 0.84, "h": 0.84 },
- { "x": 2.52, "y": 1.89, "w": 0.84, "h": 0.84 },
- { "x": 3.36, "y": 2.1, "w": 0.84, "h": 0.84 },
- { "x": 5.88, "y": 2.1, "w": 0.84, "h": 0.84 },
- { "x": 6.72, "y": 1.89, "w": 0.84, "h": 0.84 },
- { "x": 7.56, "y": 1.68, "w": 0.84, "h": 0.84 },
- { "x": 8.4, "y": 1.89, "w": 0.84, "h": 0.84 },
- { "x": 9.24, "y": 2.1, "w": 0.84, "h": 0.84 },
+ {"matrix": [1, 3], "x": 0, "y": 1.26, "w": 0.84, "h": 0.84},
+ {"matrix": [1, 4], "x": 0.84, "y": 1.05, "w": 0.84, "h": 0.84},
+ {"matrix": [1, 5], "x": 1.68, "y": 0.84, "w": 0.84, "h": 0.84},
+ {"matrix": [1, 6], "x": 2.52, "y": 1.05, "w": 0.84, "h": 0.84},
+ {"matrix": [2, 0], "x": 3.36, "y": 1.26, "w": 0.84, "h": 0.84},
- { "x": 1.68, "y": 2.52, "w": 0.84, "h": 0.84 },
- { "x": 2.52, "y": 2.73, "w": 0.84, "h": 0.84 },
- { "x": 3.36, "y": 2.94, "w": 0.84, "h": 0.84 },
- { "x": 4.2, "y": 2.94, "w": 0.84, "h": 0.84 },
- { "x": 5.04, "y": 2.94, "w": 0.84, "h": 0.84 },
- { "x": 5.88, "y": 2.94, "w": 0.84, "h": 0.84 },
- { "x": 6.72, "y": 2.73, "w": 0.84, "h": 0.84 },
- { "x": 7.56, "y": 2.52, "w": 0.84, "h": 0.84 }
+ {"matrix": [2, 1], "x": 5.88, "y": 1.26, "w": 0.84, "h": 0.84},
+ {"matrix": [2, 2], "x": 6.72, "y": 1.05, "w": 0.84, "h": 0.84},
+ {"matrix": [2, 3], "x": 7.56, "y": 0.84, "w": 0.84, "h": 0.84},
+ {"matrix": [2, 4], "x": 8.4, "y": 1.05, "w": 0.84, "h": 0.84},
+ {"matrix": [2, 5], "x": 9.24, "y": 1.26, "w": 0.84, "h": 0.84},
+
+ {"matrix": [2, 6], "x": 0, "y": 2.1, "w": 0.84, "h": 0.84},
+ {"matrix": [3, 0], "x": 0.84, "y": 1.89, "w": 0.84, "h": 0.84},
+ {"matrix": [3, 1], "x": 1.68, "y": 1.68, "w": 0.84, "h": 0.84},
+ {"matrix": [3, 2], "x": 2.52, "y": 1.89, "w": 0.84, "h": 0.84},
+ {"matrix": [3, 3], "x": 3.36, "y": 2.1, "w": 0.84, "h": 0.84},
+
+ {"matrix": [3, 4], "x": 5.88, "y": 2.1, "w": 0.84, "h": 0.84},
+ {"matrix": [3, 5], "x": 6.72, "y": 1.89, "w": 0.84, "h": 0.84},
+ {"matrix": [3, 6], "x": 7.56, "y": 1.68, "w": 0.84, "h": 0.84},
+ {"matrix": [4, 0], "x": 8.4, "y": 1.89, "w": 0.84, "h": 0.84},
+ {"matrix": [4, 1], "x": 9.24, "y": 2.1, "w": 0.84, "h": 0.84},
+
+ {"matrix": [4, 2], "x": 1.68, "y": 2.52, "w": 0.84, "h": 0.84},
+ {"matrix": [4, 3], "x": 2.52, "y": 2.73, "w": 0.84, "h": 0.84},
+ {"matrix": [4, 4], "x": 3.36, "y": 2.94, "w": 0.84, "h": 0.84},
+ {"matrix": [4, 5], "x": 4.2, "y": 2.94, "w": 0.84, "h": 0.84},
+
+ {"matrix": [4, 6], "x": 5.04, "y": 2.94, "w": 0.84, "h": 0.84},
+ {"matrix": [5, 0], "x": 5.88, "y": 2.94, "w": 0.84, "h": 0.84},
+ {"matrix": [5, 1], "x": 6.72, "y": 2.73, "w": 0.84, "h": 0.84},
+ {"matrix": [5, 2], "x": 7.56, "y": 2.52, "w": 0.84, "h": 0.84}
]
}
}
diff --git a/keyboards/takashicompany/minizone/minizone.c b/keyboards/takashicompany/minizone/minizone.c
index 5231c8c497..1574b0aef7 100644
--- a/keyboards/takashicompany/minizone/minizone.c
+++ b/keyboards/takashicompany/minizone/minizone.c
@@ -1,7 +1,7 @@
// Copyright 2022 takashicompany (@takashicompany)
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "minizone.h"
+#include "quantum.h"
#ifdef OLED_ENABLE
diff --git a/keyboards/takashicompany/minizone/minizone.h b/keyboards/takashicompany/minizone/minizone.h
deleted file mode 100644
index 0e8d62c30d..0000000000
--- a/keyboards/takashicompany/minizone/minizone.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2022 takashicompany (@takashicompany)
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#pragma once
-
-#include "quantum.h"
-
-#define XXX KC_NO
-
-/* This is 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.
- */
-#define LAYOUT( \
- 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, k36, k40, k41, \
- k42, k43, k44, k45, k46, k50, k51, k52 \
-) { \
- { 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, k36 }, \
- { k40, k41, k42, k43, k44, k45, k46 }, \
- { k50, k51, k52, XXX, XXX, XXX, XXX } \
-}