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

@ -28,11 +28,42 @@
"layouts": {
"LAYOUT": {
"layout": [
{"label":"/", "x":3.25, "y":0}, {"label":"*", "x":4.25, "y":0}, {"label":"-", "x":5.25, "y":0},
{"label":"Enc 1", "x":0, "y":1}, {"label":"Enc 1", "x":1, "y":1}, {"label":"7", "x":2.25, "y":1}, {"label":"8", "x":3.25, "y":1}, {"label":"9", "x":4.25, "y":1}, {"label":"+", "x":5.25, "y":1},
{"label":"Enc 2", "x":0, "y":2}, {"label":"Enc 2", "x":1, "y":2}, {"label":"4", "x":2.25, "y":2}, {"label":"5", "x":3.25, "y":2}, {"label":"6", "x":4.25, "y":2}, {"label":"+", "x":5.25, "y":2},
{"label":"Enc 3", "x":0, "y":3}, {"label":"Enc 3", "x":1, "y":3}, {"label":"1", "x":2.25, "y":3}, {"label":"2", "x":3.25, "y":3}, {"label":"3", "x":4.25, "y":3}, {"label":"Enter", "x":5.25, "y":3},
{"label":"Enc 4", "x":0, "y":4}, {"label":"Enc 4", "x":1, "y":4}, {"label":"0", "x":2.25, "y":4}, {"label":"0", "x":3.25, "y":4}, {"label":".", "x":4.25, "y":4}, {"label":"Enter", "x":5.25, "y":4}]
{"matrix": [0, 3], "x": 3.25, "y": 0},
{"matrix": [0, 4], "x": 4.25, "y": 0},
{"matrix": [0, 5], "x": 5.25, "y": 0},
{"matrix": [1, 0], "x": 0, "y": 1},
{"matrix": [1, 1], "x": 1, "y": 1},
{"matrix": [1, 2], "x": 2.25, "y": 1},
{"matrix": [1, 3], "x": 3.25, "y": 1},
{"matrix": [1, 4], "x": 4.25, "y": 1},
{"matrix": [1, 5], "x": 5.25, "y": 1},
{"matrix": [2, 0], "x": 0, "y": 2},
{"matrix": [2, 1], "x": 1, "y": 2},
{"matrix": [2, 2], "x": 2.25, "y": 2},
{"matrix": [2, 3], "x": 3.25, "y": 2},
{"matrix": [2, 4], "x": 4.25, "y": 2},
{"matrix": [2, 5], "x": 5.25, "y": 2},
{"matrix": [3, 0], "x": 0, "y": 3},
{"matrix": [3, 1], "x": 1, "y": 3},
{"matrix": [3, 2], "x": 2.25, "y": 3},
{"matrix": [3, 3], "x": 3.25, "y": 3},
{"matrix": [3, 4], "x": 4.25, "y": 3},
{"matrix": [3, 5], "x": 5.25, "y": 3},
{"matrix": [4, 0], "x": 0, "y": 4},
{"matrix": [4, 1], "x": 1, "y": 4},
{"matrix": [4, 2], "x": 2.25, "y": 4},
{"matrix": [4, 3], "x": 3.25, "y": 4},
{"matrix": [4, 4], "x": 4.25, "y": 4},
{"matrix": [4, 5], "x": 5.25, "y": 4}
]
}
}
}

View file

@ -31,10 +31,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_FUNC] = LAYOUT(
___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___
_______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
};

View file

@ -33,26 +33,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_VIA1] = LAYOUT(
___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___
_______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
[_VIA2] = LAYOUT(
___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___
_______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
[_VIA3] = LAYOUT(
___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___
_______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
};

View file

@ -33,27 +33,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_LAY1] = LAYOUT(
___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___
_______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
[_LAY2] = LAYOUT(
___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___
_______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
[_LAY3] = LAYOUT(
___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___
_______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
};

View file

@ -33,27 +33,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[_VIA1] = LAYOUT(
___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___
_______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
[_VIA2] = LAYOUT(
___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___
_______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
[_VIA3] = LAYOUT(
___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___
_______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______
),
};

View file

@ -14,7 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "tidbit.h"
#include "quantum.h"
#include "common/remote_kb.h"
#include "common/bitc_led.h"
typedef struct PACKED {
uint8_t r;

View file

@ -1,37 +0,0 @@
/* Copyright 2021 Jay Greco
*
* 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
#define ___ KC_NO
#include "quantum.h"
#include "common/remote_kb.h"
#include "common/bitc_led.h"
#define LAYOUT( \
K01, K02, K03, \
E1CCW, E1CW, K10, K11, K12, K13, \
E2CCW, E2CW, K20, K21, K22, K23, \
E3CCW, E3CW, K30, K31, K32, K33, \
E4CCW, E4CW, K40, K41, K42, K43 \
) \
{ \
{ ___, ___, ___, K01, K02, K03 }, \
{ E1CCW, E1CW, K10, K11, K12, K13 }, \
{ E2CCW, E2CW, K20, K21, K22, K23 }, \
{ E3CCW, E3CW, K30, K31, K32, K33 }, \
{ E4CCW, E4CW, K40, K41, K42, K43 } \
}