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

@@ -1,7 +1,7 @@
// Copyright 2022 Kyle McCreery (@kylemccreery)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "bbs.h"
#include "quantum.h"
#ifdef DIP_SWITCH_ENABLE
bool dip_switch_update_kb(uint8_t index, bool active) {

View File

@@ -1,26 +0,0 @@
// Copyright 2022 Kyle McCreery (@kylemccreery)
// SPDX-License-Identifier: GPL-2.0-or-later
#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,\
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B,\
k23, k24, k25, k26, k27, k28 \
) { \
{ k00, k01, k02, k03, k04, k05 }, \
{ k06, k07, k08, k09, k0A, k0B }, \
{ k10, k11, k12, k13, k14, k15 }, \
{ k16, k17, k18, k19, k1A, k1B }, \
{ k26, k27, k28, k23, k24, k25 } \
}

View File

@@ -23,38 +23,41 @@
"layouts": {
"LAYOUT": {
"layout": [
{"x":0, "y":0.375},
{"x":1, "y":0.375},
{"x":2, "y":0.125},
{"x":3, "y":0},
{"x":4, "y":0.125},
{"x":5, "y":0.125},
{"x":6.75, "y":0.125},
{"x":7.75, "y":0.125},
{"x":8.75, "y":0},
{"x":9.75, "y":0.125},
{"x":10.75, "y":0.375},
{"x":11.75, "y":0.375},
{"matrix": [0, 0], "x": 0, "y": 0.375},
{"matrix": [0, 1], "x": 1, "y": 0.375},
{"matrix": [0, 2], "x": 2, "y": 0.125},
{"matrix": [0, 3], "x": 3, "y": 0},
{"matrix": [0, 4], "x": 4, "y": 0.125},
{"matrix": [0, 5], "x": 5, "y": 0.125},
{"x":0, "y":1.375},
{"x":1, "y":1.375},
{"x":2, "y":1.125},
{"x":3, "y":1},
{"x":4, "y":1.125},
{"x":5, "y":1.125},
{"x":6.75, "y":1.125},
{"x":7.75, "y":1.125},
{"x":8.75, "y":1},
{"x":9.75, "y":1.125},
{"x":10.75, "y":1.375},
{"x":11.75, "y":1.375},
{"matrix": [1, 0], "x": 6.75, "y": 0.125},
{"matrix": [1, 1], "x": 7.75, "y": 0.125},
{"matrix": [1, 2], "x": 8.75, "y": 0},
{"matrix": [1, 3], "x": 9.75, "y": 0.125},
{"matrix": [1, 4], "x": 10.75, "y": 0.375},
{"matrix": [1, 5], "x": 11.75, "y": 0.375},
{"x":2.75, "y":3.125, "h":1.5},
{"x":3.75, "y":3.125, "h":1.5},
{"x":4.75, "y":2.875, "h":1.5},
{"x":7, "y":2.875, "h":1.5},
{"x":8, "y":3.125, "h":1.5},
{"x":9, "y":3.125, "h":1.5}
{"matrix": [2, 0], "x": 0, "y": 1.375},
{"matrix": [2, 1], "x": 1, "y": 1.375},
{"matrix": [2, 2], "x": 2, "y": 1.125},
{"matrix": [2, 3], "x": 3, "y": 1},
{"matrix": [2, 4], "x": 4, "y": 1.125},
{"matrix": [2, 5], "x": 5, "y": 1.125},
{"matrix": [3, 0], "x": 6.75, "y": 1.125},
{"matrix": [3, 1], "x": 7.75, "y": 1.125},
{"matrix": [3, 2], "x": 8.75, "y": 1},
{"matrix": [3, 3], "x": 9.75, "y": 1.125},
{"matrix": [3, 4], "x": 10.75, "y": 1.375},
{"matrix": [3, 5], "x": 11.75, "y": 1.375},
{"matrix": [4, 3], "x": 2.75, "y": 3.125, "h": 1.5},
{"matrix": [4, 4], "x": 3.75, "y": 3.125, "h": 1.5},
{"matrix": [4, 5], "x": 4.75, "y": 2.875, "h": 1.5},
{"matrix": [4, 0], "x": 7, "y": 2.875, "h": 1.5},
{"matrix": [4, 1], "x": 8, "y": 3.125, "h": 1.5},
{"matrix": [4, 2], "x": 9, "y": 3.125, "h": 1.5}
]
}
}