summaryrefslogtreecommitdiff
path: root/keyboards/redox_media
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/redox_media
parent941e159a28f1bdbdd913654c4f9a14291f8d5299 (diff)
Move single `LAYOUT`s to data driven (#20365)
Diffstat (limited to 'keyboards/redox_media')
-rw-r--r--keyboards/redox_media/info.json152
-rw-r--r--keyboards/redox_media/redox_media.c2
-rw-r--r--keyboards/redox_media/redox_media.h69
3 files changed, 80 insertions, 143 deletions
diff --git a/keyboards/redox_media/info.json b/keyboards/redox_media/info.json
index ca90fcc2d2..12e8f089b5 100644
--- a/keyboards/redox_media/info.json
+++ b/keyboards/redox_media/info.json
@@ -26,84 +26,90 @@
"layouts": {
"LAYOUT": {
"layout": [
- {"label":"Mute", "x":5.25, "y":0.15},
- {"label":"Play", "x":12.25, "y":0.15},
- {"label":"Next", "x":13.5, "y":0},
+ {"matrix": [5, 6], "x": 5.25, "y": 0.15},
- {"label":"_Nav || `", "x":0, "y":1.375, "w":1.25},
- {"label":"1", "x":1.25, "y":1.375},
- {"label":"2", "x":2.25, "y":1.125},
- {"label":"3", "x":3.25, "y":1},
- {"label":"4", "x":4.25, "y":1.125},
- {"label":"5", "x":5.25, "y":1.25},
- {"label":"6", "x":12.25, "y":1.25},
- {"label":"7", "x":13.25, "y":1.125},
- {"label":"8", "x":14.25, "y":1},
- {"label":"9", "x":15.25, "y":1.125},
- {"label":"0", "x":16.25, "y":1.375},
- {"label":"_Nav || -", "x":17.25, "y":1.375, "w":1.25},
+ {"matrix": [11, 6], "x": 12.25, "y": 0.15},
+ {"matrix": [11, 5], "x": 13.5, "y": 0},
- {"label":"Tab", "x":0, "y":2.375, "w":1.25},
- {"label":"Q", "x":1.25, "y":2.375},
- {"label":"W", "x":2.25, "y":2.125},
- {"label":"E", "x":3.25, "y":2},
- {"label":"R", "x":4.25, "y":2.125},
- {"label":"T", "x":5.25, "y":2.25},
- {"label":"MO(_SYMB)", "x":6.25, "y":1.75},
- {"label":"MO(_SYMB)", "x":11.25, "y":1.75},
- {"label":"Y", "x":12.25, "y":2.25},
- {"label":"U", "x":13.25, "y":2.125},
- {"label":"I", "x":14.25, "y":2},
- {"label":"O", "x":15.25, "y":2.125},
- {"label":"P", "x":16.25, "y":2.375},
- {"label":"=", "x":17.25, "y":2.375, "w":1.25},
+ {"matrix": [0, 0], "x": 0, "y": 1.375, "w": 1.25},
+ {"matrix": [0, 1], "x": 1.25, "y": 1.375},
+ {"matrix": [0, 2], "x": 2.25, "y": 1.125},
+ {"matrix": [0, 3], "x": 3.25, "y": 1},
+ {"matrix": [0, 4], "x": 4.25, "y": 1.125},
+ {"matrix": [0, 5], "x": 5.25, "y": 1.25},
- {"label":"Esc", "x":0, "y":3.375, "w":1.25},
- {"label":"A", "x":1.25, "y":3.375},
- {"label":"S", "x":2.25, "y":3.125},
- {"label":"D", "x":3.25, "y":3},
- {"label":"F", "x":4.25, "y":3.125},
- {"label":"G", "x":5.25, "y":3.25},
- {"label":"[", "x":6.25, "y":3},
- {"label":"]", "x":11.25, "y":3},
- {"label":"H", "x":12.25, "y":3.25},
- {"label":"J", "x":13.25, "y":3.125},
- {"label":"K", "x":14.25, "y":3},
- {"label":"L", "x":15.25, "y":3.125},
- {"label":";", "x":16.25, "y":3.375},
- {"label":"'", "x":17.25, "y":3.375, "w":1.25},
+ {"matrix": [6, 5], "x": 12.25, "y": 1.25},
+ {"matrix": [6, 4], "x": 13.25, "y": 1.125},
+ {"matrix": [6, 3], "x": 14.25, "y": 1},
+ {"matrix": [6, 2], "x": 15.25, "y": 1.125},
+ {"matrix": [6, 1], "x": 16.25, "y": 1.375},
+ {"matrix": [6, 0], "x": 17.25, "y": 1.375, "w": 1.25},
- {"label":"Shift", "x":0, "y":4.375, "w":1.25},
- {"label":"Z", "x":1.25, "y":4.375},
- {"label":"X", "x":2.25, "y":4.125},
- {"label":"C", "x":3.25, "y":4},
- {"label":"V", "x":4.25, "y":4.125},
- {"label":"B", "x":5.25, "y":4.25},
- {"label":"_Adjust/Page Up", "x":6.75, "y":4.75},
- {"label":"Page Down", "x":7.75, "y":4.75},
- {"label":"Home", "x":9.75, "y":4.75},
- {"label":"_Adjust/End", "x":10.75, "y":4.75},
- {"label":"N", "x":12.25, "y":4.25},
- {"label":"M", "x":13.25, "y":4.125},
- {"label":",", "x":14.25, "y":4},
- {"label":",", "x":15.25, "y":4.125},
- {"label":"\\", "x":16.25, "y":4.375},
- {"label":"Shift", "x":17.25, "y":4.375, "w":1.25},
+ {"matrix": [1, 0], "x": 0, "y": 2.375, "w": 1.25},
+ {"matrix": [1, 1], "x": 1.25, "y": 2.375},
+ {"matrix": [1, 2], "x": 2.25, "y": 2.125},
+ {"matrix": [1, 3], "x": 3.25, "y": 2},
+ {"matrix": [1, 4], "x": 4.25, "y": 2.125},
+ {"matrix": [1, 5], "x": 5.25, "y": 2.25},
+ {"matrix": [0, 6], "x": 6.25, "y": 1.75},
- {"label":"LGUI", "x":0.25, "y":5.375},
- {"label":"P+", "x":1.25, "y":5.375},
- {"label":"P-", "x":2.25, "y":5.125},
- {"label":"LAlt || P*", "x":3.25, "y":5},
- {"label":"LCtrl || P/", "x":5.5, "y":6.25, "w":1.25},
- {"label":"Backspace", "x":6.75, "y":5.75, "h":1.5},
- {"label":"Delete", "x":7.75, "y":5.75, "h":1.5},
- {"label":"Enter", "x":9.75, "y":5.75, "h":1.5},
- {"label":"Space", "x":10.75, "y":5.75, "h":1.5},
- {"label":"RAlt", "x":11.75, "y":6.25, "w":1.25},
- {"label":"Left", "x":14.25, "y":5},
- {"label":"Down", "x":15.25, "y":5.125},
- {"label":"Up", "x":16.25, "y":5.375},
- {"label":"Right", "x":17.25, "y":5.375}
+ {"matrix": [6, 6], "x": 11.25, "y": 1.75},
+ {"matrix": [7, 5], "x": 12.25, "y": 2.25},
+ {"matrix": [7, 4], "x": 13.25, "y": 2.125},
+ {"matrix": [7, 3], "x": 14.25, "y": 2},
+ {"matrix": [7, 2], "x": 15.25, "y": 2.125},
+ {"matrix": [7, 1], "x": 16.25, "y": 2.375},
+ {"matrix": [7, 0], "x": 17.25, "y": 2.375, "w": 1.25},
+
+ {"matrix": [2, 0], "x": 0, "y": 3.375, "w": 1.25},
+ {"matrix": [2, 1], "x": 1.25, "y": 3.375},
+ {"matrix": [2, 2], "x": 2.25, "y": 3.125},
+ {"matrix": [2, 3], "x": 3.25, "y": 3},
+ {"matrix": [2, 4], "x": 4.25, "y": 3.125},
+ {"matrix": [2, 5], "x": 5.25, "y": 3.25},
+ {"matrix": [1, 6], "x": 6.25, "y": 3},
+
+ {"matrix": [7, 6], "x": 11.25, "y": 3},
+ {"matrix": [8, 5], "x": 12.25, "y": 3.25},
+ {"matrix": [8, 4], "x": 13.25, "y": 3.125},
+ {"matrix": [8, 3], "x": 14.25, "y": 3},
+ {"matrix": [8, 2], "x": 15.25, "y": 3.125},
+ {"matrix": [8, 1], "x": 16.25, "y": 3.375},
+ {"matrix": [8, 0], "x": 17.25, "y": 3.375, "w": 1.25},
+
+ {"matrix": [3, 0], "x": 0, "y": 4.375, "w": 1.25},
+ {"matrix": [3, 1], "x": 1.25, "y": 4.375},
+ {"matrix": [3, 2], "x": 2.25, "y": 4.125},
+ {"matrix": [3, 3], "x": 3.25, "y": 4},
+ {"matrix": [3, 4], "x": 4.25, "y": 4.125},
+ {"matrix": [3, 5], "x": 5.25, "y": 4.25},
+ {"matrix": [2, 6], "x": 6.75, "y": 4.75},
+ {"matrix": [3, 6], "x": 7.75, "y": 4.75},
+
+ {"matrix": [9, 6], "x": 9.75, "y": 4.75},
+ {"matrix": [8, 6], "x": 10.75, "y": 4.75},
+ {"matrix": [9, 5], "x": 12.25, "y": 4.25},
+ {"matrix": [9, 4], "x": 13.25, "y": 4.125},
+ {"matrix": [9, 3], "x": 14.25, "y": 4},
+ {"matrix": [9, 2], "x": 15.25, "y": 4.125},
+ {"matrix": [9, 1], "x": 16.25, "y": 4.375},
+ {"matrix": [9, 0], "x": 17.25, "y": 4.375, "w": 1.25},
+
+ {"matrix": [4, 0], "x": 0.25, "y": 5.375},
+ {"matrix": [4, 1], "x": 1.25, "y": 5.375},
+ {"matrix": [4, 2], "x": 2.25, "y": 5.125},
+ {"matrix": [4, 3], "x": 3.25, "y": 5},
+ {"matrix": [4, 4], "x": 5.5, "y": 6.25, "w": 1.25},
+ {"matrix": [4, 5], "x": 6.75, "y": 5.75, "h": 1.5},
+ {"matrix": [4, 6], "x": 7.75, "y": 5.75, "h": 1.5},
+
+ {"matrix": [10, 6], "x": 9.75, "y": 5.75, "h": 1.5},
+ {"matrix": [10, 5], "x": 10.75, "y": 5.75, "h": 1.5},
+ {"matrix": [10, 4], "x": 11.75, "y": 6.25, "w": 1.25},
+ {"matrix": [10, 3], "x": 14.25, "y": 5},
+ {"matrix": [10, 2], "x": 15.25, "y": 5.125},
+ {"matrix": [10, 1], "x": 16.25, "y": 5.375},
+ {"matrix": [10, 0], "x": 17.25, "y": 5.375}
]
}
}
diff --git a/keyboards/redox_media/redox_media.c b/keyboards/redox_media/redox_media.c
index ca5a70dd49..e3a83c6c2d 100644
--- a/keyboards/redox_media/redox_media.c
+++ b/keyboards/redox_media/redox_media.c
@@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "redox_media.h"
+#include "quantum.h"
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) {
diff --git a/keyboards/redox_media/redox_media.h b/keyboards/redox_media/redox_media.h
deleted file mode 100644
index 8cd13c63f2..0000000000
--- a/keyboards/redox_media/redox_media.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-Copyright 2021 Shiftux <shiftux@gmail.com>
-
-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"
-
-#define XXX KC_NO
-
-/*
- * ┌───┐ ┌───┐┌───┐
- * │56 │ │B6 ││B5 │
- * └───┘ └───┘└───┘
- * ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐
- * │00 │01 │02 │03 │04 │05 │ │65 │64 │63 │62 │61 │60 │
- * ├───┼───┼───┼───┼───┼───┼───┐ ┌───┼───┼───┼───┼───┼───┼───┤
- * │10 │11 │12 │13 │14 │15 │06 │ │66 │75 │74 │73 │72 │71 │70 │
- * ├───┼───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┼───┤
- * │20 │21 │22 │23 │24 │25 │16 │ │76 │85 │84 │83 │82 │81 │80 │
- * ├───┼───┼───┼───┼───┼───┼───┘ └───┼───┼───┼───┼───┼───┼───┤
- * │30 │31 │32 │33 │34 │35 │ ┌───┬───┐ ┌───┬───┐ │95 │94 │93 │92 │91 │90 │
- * ├───┼───┼───┼───┼───┴───┘ │26 │36 │ │96 │86 │ └───┴───┼───┼───┼───┼───┤
- * │40 │41 │42 │43 │ ├───┼───┤ ├───┼───┤ │A3 │A2 │A1 │A0 │
- * └───┴───┴───┴───┘ ┌────┤ │ │ │ │ ├────┐ └───┴───┴───┴───┘
- * │44 │45 │46 │ │A6 │A5 │A4 │
- * └────┴───┴───┘ └───┴───┴────┘
- *
- *
- */
-
-// rows are doubled
-// clang-format off
-#define LAYOUT( \
- K56, KB6, KB5, \
- K00, K01, K02, K03, K04, K05, K65, K64, K63, K62, K61, K60, \
- K10, K11, K12, K13, K14, K15, K06, K66, K75, K74, K73, K72, K71, K70, \
- K20, K21, K22, K23, K24, K25, K16, K76, K85, K84, K83, K82, K81, K80, \
- K30, K31, K32, K33, K34, K35, K26, K36, K96, K86, K95, K94, K93, K92, K91, K90, \
- K40, K41, K42, K43, K44, K45, K46, KA6, KA5, KA4, KA3, KA2, KA1, KA0 \
-) \
-{ \
- { 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 }, \
- { XXX, XXX, XXX, XXX, XXX, XXX, K56 }, \
-\
- { K60, K61, K62, K63, K64, K65, K66 }, \
- { K70, K71, K72, K73, K74, K75, K76 }, \
- { K80, K81, K82, K83, K84, K85, K86 }, \
- { K90, K91, K92, K93, K94, K95, K96 }, \
- { KA0, KA1, KA2, KA3, KA4, KA5, KA6 }, \
- { XXX, XXX, XXX, XXX, XXX, KB5, KB6 } \
-}