diff options
author | Ryan <fauxpark@gmail.com> | 2023-04-12 13:42:51 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 13:42:51 +1000 |
commit | 5bd68e3695a82ff504c358c33445b4530c2a327f (patch) | |
tree | 10b245757dcb4f2c3c07796671ed8d284e5f5d6f /keyboards/handwired/promethium | |
parent | 941e159a28f1bdbdd913654c4f9a14291f8d5299 (diff) |
Move single `LAYOUT`s to data driven (#20365)
Diffstat (limited to 'keyboards/handwired/promethium')
-rw-r--r-- | keyboards/handwired/promethium/info.json | 106 | ||||
-rw-r--r-- | keyboards/handwired/promethium/keymaps/default/keymap.c | 8 | ||||
-rw-r--r-- | keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 8 | ||||
-rw-r--r-- | keyboards/handwired/promethium/promethium.h | 20 |
4 files changed, 57 insertions, 85 deletions
diff --git a/keyboards/handwired/promethium/info.json b/keyboards/handwired/promethium/info.json index 83f2477b3e..6daf5dd0c6 100644 --- a/keyboards/handwired/promethium/info.json +++ b/keyboards/handwired/promethium/info.json @@ -16,61 +16,65 @@ "layouts": { "LAYOUT": { "layout": [ - { "label": "k11", "x": 0, "y": 0.5 }, - { "label": "k12", "x": 1, "y": 0.3 }, - { "label": "k13", "x": 2, "y": 0.15 }, - { "label": "k14", "x": 3, "y": 0 }, - { "label": "k15", "x": 4, "y": 0.15 }, - { "label": "k16", "x": 5, "y": 0.15 }, - { "label": "k17", "x": 10, "y": 0.15 }, - { "label": "k18", "x": 11, "y": 0.15 }, - { "label": "k19", "x": 12, "y": 0 }, - { "label": "k1a", "x": 13, "y": 0.15 }, - { "label": "k1b", "x": 14, "y": 0.3 }, - { "label": "k1c", "x": 15, "y": 0.5 }, + {"matrix": [0, 0], "x": 0, "y": 0.5}, + {"matrix": [0, 1], "x": 1, "y": 0.3}, + {"matrix": [0, 2], "x": 2, "y": 0.15}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0.15}, + {"matrix": [0, 5], "x": 5, "y": 0.15}, - { "label": "k21", "x": 0, "y": 1.5 }, - { "label": "k22", "x": 1, "y": 1.3 }, - { "label": "k23", "x": 2, "y": 1.15 }, - { "label": "k24", "x": 3, "y": 1 }, - { "label": "k25", "x": 4, "y": 1.15 }, - { "label": "k26", "x": 5, "y": 1.15 }, - { "label": "k27", "x": 10, "y": 1.15 }, - { "label": "k28", "x": 11, "y": 1.15 }, - { "label": "k29", "x": 12, "y": 1 }, - { "label": "k2a", "x": 13, "y": 1.15 }, - { "label": "k2b", "x": 14, "y": 1.3 }, - { "label": "k2c", "x": 15, "y": 1.5 }, + {"matrix": [4, 0], "x": 10, "y": 0.15}, + {"matrix": [4, 1], "x": 11, "y": 0.15}, + {"matrix": [4, 2], "x": 12, "y": 0}, + {"matrix": [4, 3], "x": 13, "y": 0.15}, + {"matrix": [4, 4], "x": 14, "y": 0.3}, + {"matrix": [4, 5], "x": 15, "y": 0.5}, - { "label": "k31", "x": 0, "y": 2.5 }, - { "label": "k32", "x": 1, "y": 2.3 }, - { "label": "k33", "x": 2, "y": 2.15 }, - { "label": "k34", "x": 3, "y": 2 }, - { "label": "k35", "x": 4, "y": 2.15 }, - { "label": "k36", "x": 5, "y": 2.15 }, - { "label": "k37", "x": 10, "y": 2.15 }, - { "label": "k38", "x": 11, "y": 2.15 }, - { "label": "k39", "x": 12, "y": 2 }, - { "label": "k3a", "x": 13, "y": 2.15 }, - { "label": "k3b", "x": 14, "y": 2.3 }, - { "label": "k3c", "x": 15, "y": 2.5 }, + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.3}, + {"matrix": [1, 2], "x": 2, "y": 1.15}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1.15}, + {"matrix": [1, 5], "x": 5, "y": 1.15}, - { "label": "k41", "x": 0, "y": 3.5 }, - { "label": "k42", "x": 1, "y": 3.3 }, - { "label": "k43", "x": 2, "y": 3.15 }, - { "label": "k44", "x": 3, "y": 3 }, - { "label": "k45", "x": 4, "y": 3.15 }, - { "label": "k46", "x": 5, "y": 3.15 }, - { "label": "k47", "x": 10, "y": 3.15 }, - { "label": "k48", "x": 11, "y": 3.15 }, - { "label": "k49", "x": 12, "y": 3 }, - { "label": "k4a", "x": 13, "y": 3.15 }, - { "label": "k4b", "x": 14, "y": 3.3 }, - { "label": "k4c", "x": 15, "y": 3.5 }, + {"matrix": [5, 0], "x": 10, "y": 1.15}, + {"matrix": [5, 1], "x": 11, "y": 1.15}, + {"matrix": [5, 2], "x": 12, "y": 1}, + {"matrix": [5, 3], "x": 13, "y": 1.15}, + {"matrix": [5, 4], "x": 14, "y": 1.3}, + {"matrix": [5, 5], "x": 15, "y": 1.5}, - { "label": "tp1", "x": 6.5, "y": 3.15 }, - { "label": "tp2", "x": 7.5, "y": 3.15 }, - { "label": "tp3", "x": 8.5, "y": 3.15 } + {"matrix": [2, 0], "x": 0, "y": 2.5}, + {"matrix": [2, 1], "x": 1, "y": 2.3}, + {"matrix": [2, 2], "x": 2, "y": 2.15}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2.15}, + {"matrix": [2, 5], "x": 5, "y": 2.15}, + + {"matrix": [6, 0], "x": 10, "y": 2.15}, + {"matrix": [6, 1], "x": 11, "y": 2.15}, + {"matrix": [6, 2], "x": 12, "y": 2}, + {"matrix": [6, 3], "x": 13, "y": 2.15}, + {"matrix": [6, 4], "x": 14, "y": 2.3}, + {"matrix": [6, 5], "x": 15, "y": 2.5}, + + {"matrix": [3, 0], "x": 0, "y": 3.5}, + {"matrix": [3, 1], "x": 1, "y": 3.3}, + {"matrix": [3, 2], "x": 2, "y": 3.15}, + {"matrix": [3, 3], "x": 3, "y": 3}, + {"matrix": [3, 4], "x": 4, "y": 3.15}, + {"matrix": [3, 5], "x": 5, "y": 3.15}, + + {"matrix": [7, 0], "x": 10, "y": 3.15}, + {"matrix": [7, 1], "x": 11, "y": 3.15}, + {"matrix": [7, 2], "x": 12, "y": 3}, + {"matrix": [7, 3], "x": 13, "y": 3.15}, + {"matrix": [7, 4], "x": 14, "y": 3.3}, + {"matrix": [7, 5], "x": 15, "y": 3.5}, + + {"matrix": [8, 0], "x": 6.5, "y": 3.15}, + {"matrix": [8, 1], "x": 7.5, "y": 3.15}, + {"matrix": [8, 2], "x": 8.5, "y": 3.15} ] } } diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c index 21dd99d95a..100db97678 100644 --- a/keyboards/handwired/promethium/keymaps/default/keymap.c +++ b/keyboards/handwired/promethium/keymaps/default/keymap.c @@ -13,13 +13,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/>. */ -#if defined(PRIYADI_PROMETHIUM) - #include "promethium.h" -#elif defined(PRIYADI_PLANCK) - #include "planck.h" -#else - #error "no keyboard defined" -#endif +#include QMK_KEYBOARD_H #include "action_layer.h" #ifdef AUDIO_ENABLE diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 1ebf63037b..1d299c2299 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -13,13 +13,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/>. */ -#if defined(PRIYADI_PROMETHIUM) - #include "promethium.h" -#elif defined(PRIYADI_PLANCK) - #include "planck.h" -#else - #error "no keyboard defined" -#endif +#include QMK_KEYBOARD_H #include "action_layer.h" #ifdef AUDIO_ENABLE diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index 0d594a7942..b4dd2cd5ff 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -3,23 +3,3 @@ #include "quantum.h" void battery_poll(uint8_t level); - -#define XXX KC_NO - -#define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ - k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ - k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ - k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75, \ - tp1, tp2, tp3 \ -) { \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k33, k34, k35 }, \ - { k40, k41, k42, k43, k44, k45 }, \ - { k50, k51, k52, k53, k54, k55 }, \ - { k60, k61, k62, k63, k64, k65 }, \ - { k70, k71, k72, k73, k74, k75 }, \ - { tp1, tp2, tp3, XXX, XXX, XXX } \ -} |