Move single LAYOUTs to data driven (#20365)

This commit is contained in:
Ryan
2023-04-12 13:42:51 +10:00
committed by GitHub
parent 941e159a28
commit 5bd68e3695
1443 changed files with 45214 additions and 59923 deletions

View File

@@ -25,83 +25,91 @@
"layouts": {
"LAYOUT": {
"layout": [
{"label":"L05", "x":0, "y":0.375, "w":1.5},
{"label":"L04", "x":1.5, "y":0.375},
{"label":"L03", "x":2.5, "y":0.125},
{"label":"L02", "x":3.5, "y":0},
{"label":"L01", "x":4.5, "y":0.125},
{"label":"L00", "x":5.5, "y":0.25},
{"label":"R70", "x":12.5, "y":0.25},
{"label":"R71", "x":13.5, "y":0.125},
{"label":"R72", "x":14.5, "y":0},
{"label":"R73", "x":15.5, "y":0.125},
{"label":"R74", "x":16.5, "y":0.375},
{"label":"R75", "x":17.5, "y":0.375, "w":1.5},
{"matrix": [0, 5], "x": 0, "y": 0.375, "w": 1.5},
{"matrix": [0, 4], "x": 1.5, "y": 0.375},
{"matrix": [0, 3], "x": 2.5, "y": 0.125},
{"matrix": [0, 2], "x": 3.5, "y": 0},
{"matrix": [0, 1], "x": 4.5, "y": 0.125},
{"matrix": [0, 0], "x": 5.5, "y": 0.25},
{"label":"L15", "x":0, "y":1.375, "w":1.5},
{"label":"L14", "x":1.5, "y":1.375},
{"label":"L13", "x":2.5, "y":1.125},
{"label":"L12", "x":3.5, "y":1},
{"label":"L11", "x":4.5, "y":1.125},
{"label":"L10", "x":5.5, "y":1.25},
{"label":"R80", "x":12.5, "y":1.25},
{"label":"R81", "x":13.5, "y":1.125},
{"label":"R82", "x":14.5, "y":1},
{"label":"R83", "x":15.5, "y":1.125},
{"label":"R84", "x":16.5, "y":1.375},
{"label":"R85", "x":17.5, "y":1.375, "w":1.5},
{"matrix": [7, 0], "x": 12.5, "y": 0.25},
{"matrix": [7, 1], "x": 13.5, "y": 0.125},
{"matrix": [7, 2], "x": 14.5, "y": 0},
{"matrix": [7, 3], "x": 15.5, "y": 0.125},
{"matrix": [7, 4], "x": 16.5, "y": 0.375},
{"matrix": [7, 5], "x": 17.5, "y": 0.375, "w": 1.5},
{"label":"L25", "x":0, "y":2.375, "w":1.5},
{"label":"L24", "x":1.5, "y":2.375},
{"label":"L23", "x":2.5, "y":2.125},
{"label":"L22", "x":3.5, "y":2},
{"label":"L21", "x":4.5, "y":2.125},
{"label":"L20", "x":5.5, "y":2.25},
{"label":"R90", "x":12.5, "y":2.25},
{"label":"R91", "x":13.5, "y":2.125},
{"label":"R92", "x":14.5, "y":2},
{"label":"R93", "x":15.5, "y":2.125},
{"label":"R94", "x":16.5, "y":2.375},
{"label":"R95", "x":17.5, "y":2.375, "w":1.5},
{"matrix": [1, 5], "x": 0, "y": 1.375, "w": 1.5},
{"matrix": [1, 4], "x": 1.5, "y": 1.375},
{"matrix": [1, 3], "x": 2.5, "y": 1.125},
{"matrix": [1, 2], "x": 3.5, "y": 1},
{"matrix": [1, 1], "x": 4.5, "y": 1.125},
{"matrix": [1, 0], "x": 5.5, "y": 1.25},
{"label":"L35", "x":0, "y":3.375, "w":1.5},
{"label":"L34", "x":1.5, "y":3.375},
{"label":"L33", "x":2.5, "y":3.125},
{"label":"L32", "x":3.5, "y":3},
{"label":"L31", "x":4.5, "y":3.125},
{"label":"L30", "x":5.5, "y":3.25},
{"label":"RA0", "x":12.5, "y":3.25},
{"label":"RA1", "x":13.5, "y":3.125},
{"label":"RA2", "x":14.5, "y":3},
{"label":"RA3", "x":15.5, "y":3.125},
{"label":"RA4", "x":16.5, "y":3.375},
{"label":"RA5", "x":17.5, "y":3.375, "w":1.5},
{"matrix": [8, 0], "x": 12.5, "y": 1.25},
{"matrix": [8, 1], "x": 13.5, "y": 1.125},
{"matrix": [8, 2], "x": 14.5, "y": 1},
{"matrix": [8, 3], "x": 15.5, "y": 1.125},
{"matrix": [8, 4], "x": 16.5, "y": 1.375},
{"matrix": [8, 5], "x": 17.5, "y": 1.375, "w": 1.5},
{"label":"L45", "x":0.5, "y":4.375},
{"label":"L44", "x":1.5, "y":4.375},
{"label":"L43", "x":2.5, "y":4.125},
{"label":"L42", "x":3.5, "y":4},
{"label":"L41", "x":4.5, "y":4.125},
{"label":"RB1", "x":13.5, "y":4.125},
{"label":"RB2", "x":14.5, "y":4},
{"label":"RB3", "x":15.5, "y":4.125},
{"label":"RB4", "x":16.5, "y":4.375},
{"label":"RB5", "x":17.5, "y":4.375},
{"matrix": [2, 5], "x": 0, "y": 2.375, "w": 1.5},
{"matrix": [2, 4], "x": 1.5, "y": 2.375},
{"matrix": [2, 3], "x": 2.5, "y": 2.125},
{"matrix": [2, 2], "x": 3.5, "y": 2},
{"matrix": [2, 1], "x": 4.5, "y": 2.125},
{"matrix": [2, 0], "x": 5.5, "y": 2.25},
{"label":"L51", "x":7, "y":4.875},
{"label":"L40", "x":8, "y":4.875},
{"label":"RB0", "x":10, "y":4.875},
{"label":"RC1", "x":11, "y":4.875},
{"matrix": [9, 0], "x": 12.5, "y": 2.25},
{"matrix": [9, 1], "x": 13.5, "y": 2.125},
{"matrix": [9, 2], "x": 14.5, "y": 2},
{"matrix": [9, 3], "x": 15.5, "y": 2.125},
{"matrix": [9, 4], "x": 16.5, "y": 2.375},
{"matrix": [9, 5], "x": 17.5, "y": 2.375, "w": 1.5},
{"label":"L50", "x":8, "y":5.875},
{"label":"RC0", "x":10, "y":5.875},
{"matrix": [3, 5], "x": 0, "y": 3.375, "w": 1.5},
{"matrix": [3, 4], "x": 1.5, "y": 3.375},
{"matrix": [3, 3], "x": 2.5, "y": 3.125},
{"matrix": [3, 2], "x": 3.5, "y": 3},
{"matrix": [3, 1], "x": 4.5, "y": 3.125},
{"matrix": [3, 0], "x": 5.5, "y": 3.25},
{"label":"L52", "x":6, "y":5.875, "h":2},
{"label":"L61", "x":7, "y":5.875, "h":2},
{"label":"L60", "x":8, "y":6.875},
{"label":"RD0", "x":10, "y":6.875},
{"label":"RD1", "x":11, "y":5.875, "h":2},
{"label":"RC2", "x":12, "y":5.875, "h":2}
{"matrix": [10, 0], "x": 12.5, "y": 3.25},
{"matrix": [10, 1], "x": 13.5, "y": 3.125},
{"matrix": [10, 2], "x": 14.5, "y": 3},
{"matrix": [10, 3], "x": 15.5, "y": 3.125},
{"matrix": [10, 4], "x": 16.5, "y": 3.375},
{"matrix": [10, 5], "x": 17.5, "y": 3.375, "w": 1.5},
{"matrix": [4, 5], "x": 0.5, "y": 4.375},
{"matrix": [4, 4], "x": 1.5, "y": 4.375},
{"matrix": [4, 3], "x": 2.5, "y": 4.125},
{"matrix": [4, 2], "x": 3.5, "y": 4},
{"matrix": [4, 1], "x": 4.5, "y": 4.125},
{"matrix": [11, 1], "x": 13.5, "y": 4.125},
{"matrix": [11, 2], "x": 14.5, "y": 4},
{"matrix": [11, 3], "x": 15.5, "y": 4.125},
{"matrix": [11, 4], "x": 16.5, "y": 4.375},
{"matrix": [11, 5], "x": 17.5, "y": 4.375},
{"matrix": [5, 1], "x": 7, "y": 4.875},
{"matrix": [4, 0], "x": 8, "y": 4.875},
{"matrix": [11, 0], "x": 10, "y": 4.875},
{"matrix": [12, 1], "x": 11, "y": 4.875},
{"matrix": [5, 0], "x": 8, "y": 5.875},
{"matrix": [12, 0], "x": 10, "y": 5.875},
{"matrix": [5, 2], "x": 6, "y": 5.875, "h": 2},
{"matrix": [6, 1], "x": 7, "y": 5.875, "h": 2},
{"matrix": [6, 0], "x": 8, "y": 6.875},
{"matrix": [13, 0], "x": 10, "y": 6.875},
{"matrix": [13, 1], "x": 11, "y": 5.875, "h": 2},
{"matrix": [12, 2], "x": 12, "y": 5.875, "h": 2}
]
}
}

View File

@@ -1,56 +0,0 @@
/* Copyright 2021 StefanGrindelwald
*
* 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
/* 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( \
L05, L04, L03, L02, L01, L00, R70, R71, R72, R73, R74, R75, \
L15, L14, L13, L12, L11, L10, R80, R81, R82, R83, R84, R85, \
L25, L24, L23, L22, L21, L20, R90, R91, R92, R93, R94, R95, \
L35, L34, L33, L32, L31, L30, RA0, RA1, RA2, RA3, RA4, RA5, \
L45, L44, L43, L42, L41, RB1, RB2, RB3, RB4, RB5, \
L51, L40, RB0, RC1, \
L50, RC0, \
L52, L61, L60, RD0, RD1, RC2 \
) \
{ \
{ L00, L01, L02, L03, L04, L05 }, \
{ L10, L11, L12, L13, L14, L15 }, \
{ L20, L21, L22, L23, L24, L25 }, \
{ L30, L31, L32, L33, L34, L35 }, \
{ L40, L41, L42, L43, L44, L45 }, \
{ L50, L51, L52, XXX, XXX, XXX }, \
{ L60, L61, XXX, XXX, XXX, XXX }, \
{ R70, R71, R72, R73, R74, R75 }, \
{ R80, R81, R82, R83, R84, R85 }, \
{ R90, R91, R92, R93, R94, R95 }, \
{ RA0, RA1, RA2, RA3, RA4, RA5 }, \
{ RB0, RB1, RB2, RB3, RB4, RB5 }, \
{ RC0, RC1, RC2, XXX, XXX, XXX }, \
{ RD0, RD1, XXX, XXX, XXX, XXX } \
}