summaryrefslogtreecommitdiff
path: root/keyboards/mini_ten_key_plus
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-04-27 07:45:43 +1000
committerGitHub <noreply@github.com>2023-04-27 07:45:43 +1000
commit4871f651c5328cc8c16d1ec991f3e865094b24c8 (patch)
treecdcda3f68ab91319bc482f69c008396d66492c8b /keyboards/mini_ten_key_plus
parent67e18c0d6bea880b989104b0a0250c85902b1a75 (diff)
Move remaining `LAYOUT_all`s to data driven (#20463)
Diffstat (limited to 'keyboards/mini_ten_key_plus')
-rw-r--r--keyboards/mini_ten_key_plus/info.json69
-rw-r--r--keyboards/mini_ten_key_plus/mini_ten_key_plus.c2
-rw-r--r--keyboards/mini_ten_key_plus/mini_ten_key_plus.h78
3 files changed, 58 insertions, 91 deletions
diff --git a/keyboards/mini_ten_key_plus/info.json b/keyboards/mini_ten_key_plus/info.json
index 089668ec14..d8c0baa6cd 100644
--- a/keyboards/mini_ten_key_plus/info.json
+++ b/keyboards/mini_ten_key_plus/info.json
@@ -22,21 +22,66 @@
"bootloader": "atmel-dfu",
"layouts": {
"LAYOUT_all": {
- "layout":[
- {"label":"Esc", "x":0, "y":0} ,{"label":"Calculator", "x":1, "y":0},{"label":"/", "x":2, "y":0},{"label":"*", "x":3, "y":0},{"label":"-", "x":4, "y":0},
- {"label":"Backspace", "x":0, "y":1},{"label":"7", "x":1, "y":1} ,{"label":"8", "x":2, "y":1},{"label":"9", "x":3, "y":1},{"label":"+", "x":4, "y":1},
- {"label":"(", "x":0, "y":2} ,{"label":"4", "x":1, "y":2} ,{"label":"5", "x":2, "y":2},{"label":"6", "x":3, "y":2},{"label":"+", "x":4, "y":2},
- {"label":")", "x":0, "y":3} ,{"label":"1", "x":1, "y":3} ,{"label":"2", "x":2, "y":3},{"label":"3", "x":3, "y":3},{"label":"Enter", "x":4, "y":3},
- {"label":"y", "x":0, "y":4} ,{"label":"00", "x":1, "y":4} ,{"label":"0", "x":2, "y":4},{"label":".", "x":3, "y":4},{"label":"Enter", "x":4, "y":4}
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1, "y": 1},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+ {"matrix": [1, 4], "x": 4, "y": 1},
+
+ {"matrix": [2, 0], "x": 0, "y": 2},
+ {"matrix": [2, 1], "x": 1, "y": 2},
+ {"matrix": [2, 2], "x": 2, "y": 2},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+ {"matrix": [2, 4], "x": 4, "y": 2},
+
+ {"matrix": [3, 0], "x": 0, "y": 3},
+ {"matrix": [3, 1], "x": 1, "y": 3},
+ {"matrix": [3, 2], "x": 2, "y": 3},
+ {"matrix": [3, 3], "x": 3, "y": 3},
+ {"matrix": [3, 4], "x": 4, "y": 3},
+
+ {"matrix": [4, 0], "x": 0, "y": 4},
+ {"matrix": [4, 1], "x": 1, "y": 4},
+ {"matrix": [4, 2], "x": 2, "y": 4},
+ {"matrix": [4, 3], "x": 3, "y": 4},
+ {"matrix": [4, 4], "x": 4, "y": 4}
]
},
"LAYOUT_standard_numpad": {
- "layout":[
- {"label":"Esc", "x":0, "y":0} ,{"label":"Calculator", "x":1, "y":0},{"label":"/", "x":2, "y":0},{"label":"*", "x":3, "y":0},{"label":"-", "x":4, "y":0},
- {"label":"Backspace", "x":0, "y":1},{"label":"7", "x":1, "y":1} ,{"label":"8", "x":2, "y":1},{"label":"9", "x":3, "y":1},{"label":"+", "x":4, "y":1, "h":2},
- {"label":"(", "x":0, "y":2} ,{"label":"4", "x":1, "y":2} ,{"label":"5", "x":2, "y":2},{"label":"6", "x":3, "y":2},
- {"label":")", "x":0, "y":3} ,{"label":"1", "x":1, "y":3} ,{"label":"2", "x":2, "y":3},{"label":"3", "x":3, "y":3},{"label":"Enter", "x":4, "y":3, "h":2},
- {"label":"y", "x":0, "y":4} ,{"label":"0", "x":1, "y":4 ,"w":2} , {"label":".", "x":3, "y":4}
+ "layout": [
+ {"matrix": [0, 0], "x": 0, "y": 0},
+ {"matrix": [0, 1], "x": 1, "y": 0},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0},
+
+ {"matrix": [1, 0], "x": 0, "y": 1},
+ {"matrix": [1, 1], "x": 1, "y": 1},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+ {"matrix": [2, 0], "x": 4, "y": 1, "h": 2},
+
+ {"matrix": [2, 1], "x": 0, "y": 2},
+ {"matrix": [2, 2], "x": 1, "y": 2},
+ {"matrix": [2, 3], "x": 2, "y": 2},
+ {"matrix": [2, 4], "x": 3, "y": 2},
+
+ {"matrix": [3, 0], "x": 0, "y": 3},
+ {"matrix": [3, 1], "x": 1, "y": 3},
+ {"matrix": [3, 2], "x": 2, "y": 3},
+ {"matrix": [3, 3], "x": 3, "y": 3},
+ {"matrix": [4, 0], "x": 4, "y": 3, "h": 2},
+
+ {"matrix": [4, 2], "x": 0, "y": 4},
+ {"matrix": [4, 3], "x": 1, "y": 4, "w": 2},
+ {"matrix": [4, 4], "x": 3, "y": 4}
]
}
}
diff --git a/keyboards/mini_ten_key_plus/mini_ten_key_plus.c b/keyboards/mini_ten_key_plus/mini_ten_key_plus.c
index b2b7456b53..6dc60c9de1 100644
--- a/keyboards/mini_ten_key_plus/mini_ten_key_plus.c
+++ b/keyboards/mini_ten_key_plus/mini_ten_key_plus.c
@@ -1,7 +1,7 @@
// Copyright 2021 minibois (@minibois)
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "mini_ten_key_plus.h"
+#include "quantum.h"
/* Rotary Encoder's function (currently volume up/down) */
bool encoder_update_kb(uint8_t index, bool clockwise) {
diff --git a/keyboards/mini_ten_key_plus/mini_ten_key_plus.h b/keyboards/mini_ten_key_plus/mini_ten_key_plus.h
deleted file mode 100644
index fef3b6a8c3..0000000000
--- a/keyboards/mini_ten_key_plus/mini_ten_key_plus.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Copyright 2021 minibois
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-// readability
-#define ___ KC_NO
-
-/* Default
- * ,-------------------.
- * |00 |01 |02 |03 |04 |
- * |-------------------|
- * |10 |11 |12 |13 |14 |
- * |-------------------|
- * |20 |21 |22 |23 |24 |
- * |-------------------|
- * |30 |31 |32 |33 |34 |
- * |-------------------|
- * |40 |41 |42 |43 |44 |
- * `-------------------'
-*/
-#define LAYOUT_all( \
- k00, k01, k02, k03, k04 , \
- k10, k11, k12, k13, k14 , \
- k20, k21, k22, k23, k24 , \
- k30, k31, k32, k33, k34 , \
- k40, k41, k42, k43, k44 \
-) \
-{ \
- { k00, k01, k02, k03, k04, }, \
- { k10, k11, k12, k13, k14, }, \
- { k20, k21, k22, k23, k24, }, \
- { k30, k31, k32, k33, k34, }, \
- { k40, k41, k42, k43, k44, } \
-}
-
-/* Standard Numpad
- * ,-------------------.
- * |00 |01 |02 |03 |04 |
- * |-------------------|
- * |10 |11 |12 |13 | |
- * |---------------|14 |
- * |20 |21 |22 |23 | |
- * |-------------------|
- * |30 |31 |32 |33 | |
- * |---------------|34 |
- * |40 | 41 |43 | |
- * `-------------------'
-*/
-#define LAYOUT_standard_numpad( \
- k00, k01, k02, k03, k04 , \
- k10, k11, k12, k13, \
- k20, k21, k22, k23, k24 , \
- k30, k31, k32, k33, \
- k40, k42, k43, k44 \
-) \
-{ \
- { k00, k01, k02, k03, k04, }, \
- { k10, k11, k12, k13, ___, }, \
- { k20, k21, k22, k23, k24, }, \
- { k30, k31, k32, k33, ___, }, \
- { k40, ___, k42, k43, k44, } \
-}