1
0
Fork 0

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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1443 changed files with 45214 additions and 59923 deletions

View file

@ -1,41 +0,0 @@
/* Copyright 2020 DeskDaily
*
* 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"
/* 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( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
K10, K11, K12, K13, K14, K15, K16, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \
K20, K21, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \
K31, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, \
K41, K44, K45, K46, K48, K4B, K4E \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
{ K10, K11, K12, K13, K14, K15, K16, KC_NO, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
{ K20, K21, KC_NO, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \
{ KC_NO, K31, KC_NO, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \
{ KC_NO, K41, KC_NO, KC_NO, K44, K45, K46, KC_NO, K48, KC_NO, KC_NO, K4B, KC_NO, KC_NO, K4E, KC_NO }, \
}

View file

@ -24,76 +24,84 @@
"layouts": {
"LAYOUT": {
"layout": [
{"x":0.5, "y":0},
{"x":1.75, "y":0.1},
{"x":2.75, "y":0.1},
{"x":3.75, "y":0.1},
{"x":4.75, "y":0.1},
{"x":5.75, "y":0.1},
{"x":6.75, "y":0.1},
{"x":7.75, "y":0.1},
{"x":11.25, "y":0.1},
{"x":12.25, "y":0.1},
{"x":13.25, "y":0.1},
{"x":14.25, "y":0.1},
{"x":15.25, "y":0.1},
{"x":16.25, "y":0.1},
{"x":17.25, "y":0.1},
{"x":18.25, "y":0.1},
{"label": "K00", "matrix": [0, 0], "x": 0.5, "y": 0},
{"x":0.25, "y":1},
{"x":1.5, "y":1.1, "w":1.5},
{"x":3, "y":1.1},
{"x":4.25, "y":1.1},
{"x":5.25, "y":1.1},
{"x":6.25, "y":1.1},
{"x":7.25, "y":1.1},
{"x":10.75, "y":1.1},
{"x":11.75, "y":1.1},
{"x":12.75, "y":1.1},
{"x":13.75, "y":1.1},
{"x":15, "y":1.1},
{"x":16, "y":1.1},
{"x":17, "y":1.1},
{"x":18, "y":1.1, "w":1.5},
{"label": "K01", "matrix": [0, 1], "x": 1.75, "y": 0.1},
{"label": "K02", "matrix": [0, 2], "x": 2.75, "y": 0.1},
{"label": "K03", "matrix": [0, 3], "x": 3.75, "y": 0.1},
{"label": "K04", "matrix": [0, 4], "x": 4.75, "y": 0.1},
{"label": "K05", "matrix": [0, 5], "x": 5.75, "y": 0.1},
{"label": "K06", "matrix": [0, 6], "x": 6.75, "y": 0.1},
{"label": "K07", "matrix": [0, 7], "x": 7.75, "y": 0.1},
{"x":0, "y":2},
{"x":1.25, "y":2.1, "w":1.75},
{"x":3, "y":2.1},
{"x":4.5, "y":2.1},
{"x":5.5, "y":2.1},
{"x":6.5, "y":2.1},
{"x":7.5, "y":2.1},
{"x":11, "y":2.1},
{"x":12, "y":2.1},
{"x":13, "y":2.1},
{"x":14, "y":2.1},
{"x":15.5, "y":2.1},
{"x":16.5, "y":2.1},
{"x":17.5, "y":2.1, "w":2.25},
{"label": "K08", "matrix": [0, 8], "x": 11.25, "y": 0.1},
{"label": "K09", "matrix": [0, 9], "x": 12.25, "y": 0.1},
{"label": "K0A", "matrix": [0, 10], "x": 13.25, "y": 0.1},
{"label": "K0B", "matrix": [0, 11], "x": 14.25, "y": 0.1},
{"label": "K0C", "matrix": [0, 12], "x": 15.25, "y": 0.1},
{"label": "K0D", "matrix": [0, 13], "x": 16.25, "y": 0.1},
{"label": "K0E", "matrix": [0, 14], "x": 17.25, "y": 0.1},
{"label": "K0F", "matrix": [0, 15], "x": 18.25, "y": 0.1},
{"x":1, "y":3.1, "w":2.25},
{"x":3.25, "y":3.1},
{"x":5, "y":3.1},
{"x":6, "y":3.1},
{"x":7, "y":3.1},
{"x":8, "y":3.1},
{"x":10.5, "y":3.1},
{"x":11.5, "y":3.1},
{"x":12.5, "y":3.1},
{"x":13.5, "y":3.1},
{"x":15.25, "y":3.1},
{"x":16.25, "y":3.1},
{"x":17.25, "y":3.1, "w":1.75},
{"x":19, "y":3.1},
{"label": "K10", "matrix": [1, 0], "x": 0.25, "y": 1},
{"x":1, "y":4.1, "w":1.5},
{"x":4.75, "y":4.1, "w":1.5},
{"x":6.25, "y":4.1, "w":2},
{"x":8.25, "y":4.1, "w":1.25},
{"x":10.5, "y":4.1, "w":2.75},
{"x":13.25, "y":4.1, "w":1.5},
{"x":18.25, "y":4.1, "w":1.5}
{"label": "K11", "matrix": [1, 1], "x": 1.5, "y": 1.1, "w": 1.5},
{"label": "K12", "matrix": [1, 2], "x": 3, "y": 1.1},
{"label": "K13", "matrix": [1, 3], "x": 4.25, "y": 1.1},
{"label": "K14", "matrix": [1, 4], "x": 5.25, "y": 1.1},
{"label": "K15", "matrix": [1, 5], "x": 6.25, "y": 1.1},
{"label": "K16", "matrix": [1, 6], "x": 7.25, "y": 1.1},
{"label": "K18", "matrix": [1, 8], "x": 10.75, "y": 1.1},
{"label": "K19", "matrix": [1, 9], "x": 11.75, "y": 1.1},
{"label": "K1A", "matrix": [1, 10], "x": 12.75, "y": 1.1},
{"label": "K1B", "matrix": [1, 11], "x": 13.75, "y": 1.1},
{"label": "K1C", "matrix": [1, 12], "x": 15, "y": 1.1},
{"label": "K1D", "matrix": [1, 13], "x": 16, "y": 1.1},
{"label": "K1E", "matrix": [1, 14], "x": 17, "y": 1.1},
{"label": "K1F", "matrix": [1, 15], "x": 18, "y": 1.1, "w": 1.5},
{"label": "K20", "matrix": [2, 0], "x": 0, "y": 2},
{"label": "K21", "matrix": [2, 1], "x": 1.25, "y": 2.1, "w": 1.75},
{"label": "K23", "matrix": [2, 3], "x": 3, "y": 2.1},
{"label": "K24", "matrix": [2, 4], "x": 4.5, "y": 2.1},
{"label": "K25", "matrix": [2, 5], "x": 5.5, "y": 2.1},
{"label": "K26", "matrix": [2, 6], "x": 6.5, "y": 2.1},
{"label": "K27", "matrix": [2, 7], "x": 7.5, "y": 2.1},
{"label": "K28", "matrix": [2, 8], "x": 11, "y": 2.1},
{"label": "K29", "matrix": [2, 9], "x": 12, "y": 2.1},
{"label": "K2A", "matrix": [2, 10], "x": 13, "y": 2.1},
{"label": "K2B", "matrix": [2, 11], "x": 14, "y": 2.1},
{"label": "K2C", "matrix": [2, 12], "x": 15.5, "y": 2.1},
{"label": "K2D", "matrix": [2, 13], "x": 16.5, "y": 2.1},
{"label": "K2F", "matrix": [2, 15], "x": 17.5, "y": 2.1, "w": 2.25},
{"label": "K31", "matrix": [3, 1], "x": 1, "y": 3.1, "w": 2.25},
{"label": "K33", "matrix": [3, 3], "x": 3.25, "y": 3.1},
{"label": "K34", "matrix": [3, 4], "x": 5, "y": 3.1},
{"label": "K35", "matrix": [3, 5], "x": 6, "y": 3.1},
{"label": "K36", "matrix": [3, 6], "x": 7, "y": 3.1},
{"label": "K37", "matrix": [3, 7], "x": 8, "y": 3.1},
{"label": "K38", "matrix": [3, 8], "x": 10.5, "y": 3.1},
{"label": "K39", "matrix": [3, 9], "x": 11.5, "y": 3.1},
{"label": "K3A", "matrix": [3, 10], "x": 12.5, "y": 3.1},
{"label": "K3B", "matrix": [3, 11], "x": 13.5, "y": 3.1},
{"label": "K3C", "matrix": [3, 12], "x": 15.25, "y": 3.1},
{"label": "K3D", "matrix": [3, 13], "x": 16.25, "y": 3.1},
{"label": "K3E", "matrix": [3, 14], "x": 17.25, "y": 3.1, "w": 1.75},
{"label": "K3F", "matrix": [3, 15], "x": 19, "y": 3.1},
{"label": "K41", "matrix": [4, 1], "x": 1, "y": 4.1, "w": 1.5},
{"label": "K44", "matrix": [4, 4], "x": 4.75, "y": 4.1, "w": 1.5},
{"label": "K45", "matrix": [4, 5], "x": 6.25, "y": 4.1, "w": 2},
{"label": "K46", "matrix": [4, 6], "x": 8.25, "y": 4.1, "w": 1.25},
{"label": "K48", "matrix": [4, 8], "x": 10.5, "y": 4.1, "w": 2.75},
{"label": "K4B", "matrix": [4, 11], "x": 13.25, "y": 4.1, "w": 1.5},
{"label": "K4E", "matrix": [4, 14], "x": 18.25, "y": 4.1, "w": 1.5}
]
}
}