From 5bd68e3695a82ff504c358c33445b4530c2a327f Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 12 Apr 2023 13:42:51 +1000 Subject: Move single `LAYOUT`s to data driven (#20365) --- keyboards/elephant42/elephant42.c | 2 +- keyboards/elephant42/elephant42.h | 35 ---------------- keyboards/elephant42/info.json | 86 +++++++++++++++++++-------------------- 3 files changed, 44 insertions(+), 79 deletions(-) delete mode 100644 keyboards/elephant42/elephant42.h (limited to 'keyboards/elephant42') diff --git a/keyboards/elephant42/elephant42.c b/keyboards/elephant42/elephant42.c index a459442231..1ffb5e8083 100644 --- a/keyboards/elephant42/elephant42.c +++ b/keyboards/elephant42/elephant42.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "elephant42.h" +#include "quantum.h" #if defined(RGB_MATRIX_ENABLE) led_config_t g_led_config = { diff --git a/keyboards/elephant42/elephant42.h b/keyboards/elephant42/elephant42.h deleted file mode 100644 index ad79c1e1fc..0000000000 --- a/keyboards/elephant42/elephant42.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2021 illness072 - * - * 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 . - */ - -#pragma once - -#include "quantum.h" - -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, \ - L30, L31, L32, L33, R30, R31, R32, R33 \ -) { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { KC_NO, L21, L22, L23, L24, L25 }, \ - { KC_NO, KC_NO, L30, L31, L32, L33 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { KC_NO, R24, R23, R22, R21, R20 }, \ - { KC_NO, KC_NO, R33, R32, R31, R30 } \ -} diff --git a/keyboards/elephant42/info.json b/keyboards/elephant42/info.json index d1218ddb4e..8bbaf67179 100644 --- a/keyboards/elephant42/info.json +++ b/keyboards/elephant42/info.json @@ -27,55 +27,55 @@ "layouts": { "LAYOUT": { "layout": [ - {"label":"Tab", "x":0, "y":1.6}, - {"label":"Q", "x":1, "y":1.1}, - {"label":"W", "x":2, "y":0.3}, - {"label":"E", "x":3, "y":0}, - {"label":"R", "x":4, "y":0.6}, - {"label":"T", "x":5, "y":0.8}, + {"matrix": [0, 0], "x": 0, "y": 1.6}, + {"matrix": [0, 1], "x": 1, "y": 1.1}, + {"matrix": [0, 2], "x": 2, "y": 0.3}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0.6}, + {"matrix": [0, 5], "x": 5, "y": 0.8}, - {"label":"Y", "x":10.5, "y":0.8}, - {"label":"U", "x":11.5, "y":0.6}, - {"label":"I", "x":12.5, "y":0}, - {"label":"O", "x":13.5, "y":0.3}, - {"label":"P", "x":14.5, "y":1.1}, - {"label":"\\", "x":15.5, "y":1.6}, + {"matrix": [4, 5], "x": 10.5, "y": 0.8}, + {"matrix": [4, 4], "x": 11.5, "y": 0.6}, + {"matrix": [4, 3], "x": 12.5, "y": 0}, + {"matrix": [4, 2], "x": 13.5, "y": 0.3}, + {"matrix": [4, 1], "x": 14.5, "y": 1.1}, + {"matrix": [4, 0], "x": 15.5, "y": 1.6}, - {"label":"Ctrl", "x":0, "y":2.6}, - {"label":"A", "x":1, "y":2.1}, - {"label":"S", "x":2, "y":1.3}, - {"label":"D", "x":3, "y":1}, - {"label":"F", "x":4, "y":1.6}, - {"label":"G", "x":5, "y":1.8}, + {"matrix": [1, 0], "x": 0, "y": 2.6}, + {"matrix": [1, 1], "x": 1, "y": 2.1}, + {"matrix": [1, 2], "x": 2, "y": 1.3}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 1.6}, + {"matrix": [1, 5], "x": 5, "y": 1.8}, - {"label":"H", "x":10.5, "y":1.8}, - {"label":"J", "x":11.5, "y":1.6}, - {"label":"K", "x":12.5, "y":1}, - {"label":"L", "x":13.5, "y":1.3}, - {"label":":", "x":14.5, "y":2.1}, - {"label":"\"", "x":15.5, "y":2.6}, + {"matrix": [5, 5], "x": 10.5, "y": 1.8}, + {"matrix": [5, 4], "x": 11.5, "y": 1.6}, + {"matrix": [5, 3], "x": 12.5, "y": 1}, + {"matrix": [5, 2], "x": 13.5, "y": 1.3}, + {"matrix": [5, 1], "x": 14.5, "y": 2.1}, + {"matrix": [5, 0], "x": 15.5, "y": 2.6}, - {"label":"Z", "x":1, "y":3.1}, - {"label":"X", "x":2, "y":2.3}, - {"label":"C", "x":3, "y":2}, - {"label":"V", "x":4, "y":2.6}, - {"label":"B", "x":5, "y":2.8}, + {"matrix": [2, 1], "x": 1, "y": 3.1}, + {"matrix": [2, 2], "x": 2, "y": 2.3}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 4], "x": 4, "y": 2.6}, + {"matrix": [2, 5], "x": 5, "y": 2.8}, - {"label":"N", "x":10.5, "y":2.8}, - {"label":"M", "x":11.5, "y":2.6}, - {"label":"<", "x":12.5, "y":2}, - {"label":">", "x":13.5, "y":2.3}, - {"label":"?", "x":14.5, "y":3.1}, + {"matrix": [6, 5], "x": 10.5, "y": 2.8}, + {"matrix": [6, 4], "x": 11.5, "y": 2.6}, + {"matrix": [6, 3], "x": 12.5, "y": 2}, + {"matrix": [6, 2], "x": 13.5, "y": 2.3}, + {"matrix": [6, 1], "x": 14.5, "y": 3.1}, - {"label":"Alt", "x":3.5, "y":4}, - {"label":"Cmd", "x":4.5, "y":4}, - {"label":"Lower", "x":5.5, "y":4}, - {"label":"Shift", "x":6.5, "y":4}, - - {"label":"Del", "x":9.25, "y":4}, - {"label":"Raise", "x":10.25, "y":4}, - {"label":"Enter", "x":11.25, "y":4}, - {"label":"Backspace", "x":12.25, "y":4} + {"matrix": [3, 2], "x": 3.5, "y": 4}, + {"matrix": [3, 3], "x": 4.5, "y": 4}, + {"matrix": [3, 4], "x": 5.5, "y": 4}, + {"matrix": [3, 5], "x": 6.5, "y": 4}, + + {"matrix": [7, 5], "x": 9.25, "y": 4}, + {"matrix": [7, 4], "x": 10.25, "y": 4}, + {"matrix": [7, 3], "x": 11.25, "y": 4}, + {"matrix": [7, 2], "x": 12.25, "y": 4} ] } } -- cgit v1.2.3