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

@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dogtag.h"
#include "quantum.h"
bool encoder_update_kb(uint8_t index, bool clockwise) {
keypos_t key;

View File

@@ -1,40 +0,0 @@
/* Copyright 2021 takashicompany
*
* 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( \
l01, l02, l03, l04, r01, r02, r03, r04, \
l05, l06, l07, l08, l09, r05, r06, r07, r08, r09, \
l10, l11, r10, r11 \
) { \
{ l01, l02, l03, l04, KC_NO }, \
{ l05, l06, l07, l08, l09 }, \
{ l10, l11, KC_NO, KC_NO, KC_NO }, \
{ KC_NO, r01, r02, r03, r04}, \
{ r05, r06, r07, r08, r09 }, \
{ r10, r11, KC_NO, KC_NO, KC_NO } \
}

View File

@@ -35,94 +35,33 @@
"layouts": {
"LAYOUT": {
"layout": [
{
"x": 0,
"y": 0
},
{
"x": 1,
"y": 0
},
{
"x": 2,
"y": 0
},
{
"x": 3,
"y": 0
},
{
"x": 8,
"y": 0
},
{
"x": 9,
"y": 0
},
{
"x": 10,
"y": 0
},
{
"x": 11,
"y": 0
},
{
"x": 0,
"y": 1
},
{
"x": 1,
"y": 1
},
{
"x": 2,
"y": 1
},
{
"x": 3,
"y": 1
},
{
"x": 4,
"y": 2
},
{
"x": 7,
"y": 2
},
{
"x": 8,
"y": 1
},
{
"x": 9,
"y": 1
},
{
"x": 10,
"y": 1
},
{
"x": 11,
"y": 1
},
{
"x": 3.5,
"y": 3.25
},
{
"x": 4.5,
"y": 3.25
},
{
"x": 6.5,
"y": 3.25
},
{
"x": 7.5,
"y": 3.25
}
{"matrix": [0, 0], "x": 0, "y": 0},
{"matrix": [0, 1], "x": 1, "y": 0},
{"matrix": [0, 2], "x": 2, "y": 0},
{"matrix": [0, 3], "x": 3, "y": 0},
{"matrix": [3, 1], "x": 8, "y": 0},
{"matrix": [3, 2], "x": 9, "y": 0},
{"matrix": [3, 3], "x": 10, "y": 0},
{"matrix": [3, 4], "x": 11, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1, "y": 1},
{"matrix": [1, 2], "x": 2, "y": 1},
{"matrix": [1, 3], "x": 3, "y": 1},
{"matrix": [1, 4], "x": 4, "y": 2},
{"matrix": [4, 0], "x": 7, "y": 2},
{"matrix": [4, 1], "x": 8, "y": 1},
{"matrix": [4, 2], "x": 9, "y": 1},
{"matrix": [4, 3], "x": 10, "y": 1},
{"matrix": [4, 4], "x": 11, "y": 1},
{"matrix": [2, 0], "x": 3.5, "y": 3.25},
{"matrix": [2, 1], "x": 4.5, "y": 3.25},
{"matrix": [5, 0], "x": 6.5, "y": 3.25},
{"matrix": [5, 1], "x": 7.5, "y": 3.25}
]
}
}