diff options
author | Ryan <fauxpark@gmail.com> | 2023-04-12 13:42:51 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 13:42:51 +1000 |
commit | 5bd68e3695a82ff504c358c33445b4530c2a327f (patch) | |
tree | 10b245757dcb4f2c3c07796671ed8d284e5f5d6f /keyboards/satt | |
parent | 941e159a28f1bdbdd913654c4f9a14291f8d5299 (diff) |
Move single `LAYOUT`s to data driven (#20365)
Diffstat (limited to 'keyboards/satt')
-rw-r--r-- | keyboards/satt/comet46/comet46.h | 21 | ||||
-rw-r--r-- | keyboards/satt/comet46/info.json | 96 | ||||
-rw-r--r-- | keyboards/satt/comet46/lib/host_led_state_reader.c | 2 | ||||
-rw-r--r-- | keyboards/satt/comet46/lib/modifier_state_reader.c | 2 | ||||
-rw-r--r-- | keyboards/satt/vision/info.json | 60 | ||||
-rw-r--r-- | keyboards/satt/vision/vision.h | 31 |
6 files changed, 111 insertions, 101 deletions
diff --git a/keyboards/satt/comet46/comet46.h b/keyboards/satt/comet46/comet46.h deleted file mode 100644 index 094d960e20..0000000000 --- a/keyboards/satt/comet46/comet46.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define XXX KC_NO - -// This a shortcut to help you visually see your layout. -// The first section contains all of the arguements -// The second converts the arguments into a two-dimensional array -#define LAYOUT( \ - k04, k01, k13, k10, k22, k33, k36, k27, k19, k16, k08, k05, \ - k03, k00, k12, k24, k21, k32, k43, k46, k37, k28, k25, k17, k09, k06, \ - k02, k14, k11, k23, k20, k31, k42, k47, k38, k29, k26, k18, k15, k07, \ - k34, k44, k41, k48, k45, k35 \ -) { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ - { XXX, k31, k32, k33, k34, k35, k36, k37, k38, XXX }, \ - { XXX, k41, k42, k43, k44, k45, k46, k47, k48, XXX } \ -} diff --git a/keyboards/satt/comet46/info.json b/keyboards/satt/comet46/info.json index e8169348b6..5b11be662e 100644 --- a/keyboards/satt/comet46/info.json +++ b/keyboards/satt/comet46/info.json @@ -13,55 +13,59 @@ "layouts": { "LAYOUT": { "layout": [ - {"label":"TAB", "x":0, "y":0.45}, - {"label":"Q", "x":1, "y":0.45}, - {"label":"W", "x":2, "y":0.15}, - {"label":"E", "x":3, "y":0}, - {"label":"R", "x":4, "y":0.3}, - {"label":"T", "x":5, "y":0.45}, - {"label":"Y", "x":9, "y":0.45}, - {"label":"U", "x":10, "y":0.3}, - {"label":"I", "x":11, "y":0}, - {"label":"O", "x":12, "y":0.15}, - {"label":"P", "x":13, "y":0.45}, - {"label":"BSPC", "x":14, "y":0.45}, + {"matrix": [0, 4], "x": 0, "y": 0.45}, + {"matrix": [0, 1], "x": 1, "y": 0.45}, + {"matrix": [1, 3], "x": 2, "y": 0.15}, + {"matrix": [1, 0], "x": 3, "y": 0}, + {"matrix": [2, 2], "x": 4, "y": 0.3}, + {"matrix": [3, 3], "x": 5, "y": 0.45}, - {"label":"LCTL", "x":0, "y":1.45}, - {"label":"A", "x":1, "y":1.45}, - {"label":"S", "x":2, "y":1.15}, - {"label":"D", "x":3, "y":1}, - {"label":"F", "x":4, "y":1.3}, - {"label":"G", "x":5, "y":1.45}, - {"label":"ESC", "x":6, "y":1}, - {"label":"DEL", "x":8, "y":1}, - {"label":"H", "x":9, "y":1.45}, - {"label":"J", "x":10, "y":1.3}, - {"label":"K", "x":11, "y":1}, - {"label":"L", "x":12, "y":1.15}, - {"label":"SCLN", "x":13, "y":1.45}, - {"label":"QUOT", "x":14, "y":1.45}, + {"matrix": [3, 6], "x": 9, "y": 0.45}, + {"matrix": [2, 7], "x": 10, "y": 0.3}, + {"matrix": [1, 9], "x": 11, "y": 0}, + {"matrix": [1, 6], "x": 12, "y": 0.15}, + {"matrix": [0, 8], "x": 13, "y": 0.45}, + {"matrix": [0, 5], "x": 14, "y": 0.45}, - {"label":"LSFT", "x":0, "y":2.45}, - {"label":"Z", "x":1, "y":2.45}, - {"label":"X", "x":2, "y":2.15}, - {"label":"C", "x":3, "y":2}, - {"label":"V", "x":4, "y":2.3}, - {"label":"B", "x":5, "y":2.45}, - {"label":"LCBR", "x":6, "y":2}, - {"label":"RCBR", "x":8, "y":2}, - {"label":"N", "x":9, "y":2.45}, - {"label":"M", "x":10, "y":2.3}, - {"label":"COMM", "x":11, "y":2}, - {"label":"DOT", "x":12, "y":2.15}, - {"label":"SLSH", "x":13, "y":2.45}, - {"label":"RSFT", "x":14, "y":2.45}, + {"matrix": [0, 3], "x": 0, "y": 1.45}, + {"matrix": [0, 0], "x": 1, "y": 1.45}, + {"matrix": [1, 2], "x": 2, "y": 1.15}, + {"matrix": [2, 4], "x": 3, "y": 1}, + {"matrix": [2, 1], "x": 4, "y": 1.3}, + {"matrix": [3, 2], "x": 5, "y": 1.45}, + {"matrix": [4, 3], "x": 6, "y": 1}, - {"label":"LGUI", "x":4, "y":3.9}, - {"label":"LOWER", "x":5, "y":3.9}, - {"label":"SPACE", "x":6, "y":3.4, "h":1.5}, - {"label":"ENTER", "x":8, "y":3.4, "h":1.5}, - {"label":"RAISE", "x":9, "y":3.9}, - {"label":"LALT", "x":10, "y":3.9} + {"matrix": [4, 6], "x": 8, "y": 1}, + {"matrix": [3, 7], "x": 9, "y": 1.45}, + {"matrix": [2, 8], "x": 10, "y": 1.3}, + {"matrix": [2, 5], "x": 11, "y": 1}, + {"matrix": [1, 7], "x": 12, "y": 1.15}, + {"matrix": [0, 9], "x": 13, "y": 1.45}, + {"matrix": [0, 6], "x": 14, "y": 1.45}, + + {"matrix": [0, 2], "x": 0, "y": 2.45}, + {"matrix": [1, 4], "x": 1, "y": 2.45}, + {"matrix": [1, 1], "x": 2, "y": 2.15}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [2, 0], "x": 4, "y": 2.3}, + {"matrix": [3, 1], "x": 5, "y": 2.45}, + {"matrix": [4, 2], "x": 6, "y": 2}, + + {"matrix": [4, 7], "x": 8, "y": 2}, + {"matrix": [3, 8], "x": 9, "y": 2.45}, + {"matrix": [2, 9], "x": 10, "y": 2.3}, + {"matrix": [2, 6], "x": 11, "y": 2}, + {"matrix": [1, 8], "x": 12, "y": 2.15}, + {"matrix": [1, 5], "x": 13, "y": 2.45}, + {"matrix": [0, 7], "x": 14, "y": 2.45}, + + {"matrix": [3, 4], "x": 4, "y": 3.9}, + {"matrix": [4, 4], "x": 5, "y": 3.9}, + {"matrix": [4, 1], "x": 6, "y": 3.4, "h": 1.5}, + + {"matrix": [4, 8], "x": 8, "y": 3.4, "h": 1.5}, + {"matrix": [4, 5], "x": 9, "y": 3.9}, + {"matrix": [3, 5], "x": 10, "y": 3.9} ] } } diff --git a/keyboards/satt/comet46/lib/host_led_state_reader.c b/keyboards/satt/comet46/lib/host_led_state_reader.c index 864b1e2447..758fc4c1dc 100644 --- a/keyboards/satt/comet46/lib/host_led_state_reader.c +++ b/keyboards/satt/comet46/lib/host_led_state_reader.c @@ -1,5 +1,5 @@ #include <stdio.h> -#include "comet46.h" +#include "quantum.h" char host_led_state_str[22]; diff --git a/keyboards/satt/comet46/lib/modifier_state_reader.c b/keyboards/satt/comet46/lib/modifier_state_reader.c index 518eef92a6..c85c83b1de 100644 --- a/keyboards/satt/comet46/lib/modifier_state_reader.c +++ b/keyboards/satt/comet46/lib/modifier_state_reader.c @@ -1,5 +1,5 @@ #include <stdio.h> -#include "comet46.h" +#include "quantum.h" char modifier_state_str[22]; diff --git a/keyboards/satt/vision/info.json b/keyboards/satt/vision/info.json index 15977a5892..90dad63451 100644 --- a/keyboards/satt/vision/info.json +++ b/keyboards/satt/vision/info.json @@ -17,7 +17,65 @@ "bootloader": "stm32-dfu", "layouts": { "LAYOUT": { - "layout": [{"label":"PgUp", "x":0, "y":0}, {"label":"Esc", "x":1.25, "y":0}, {"label":"Q", "x":2.25, "y":0}, {"label":"W", "x":3.25, "y":0}, {"label":"E", "x":4.25, "y":0}, {"label":"R", "x":5.25, "y":0}, {"label":"T", "x":6.25, "y":0}, {"label":"Y", "x":9, "y":0}, {"label":"U", "x":10, "y":0}, {"label":"I", "x":11, "y":0}, {"label":"O", "x":12, "y":0}, {"label":"P", "x":13, "y":0}, {"label":"Back", "x":14, "y":0}, {"label":"Del", "x":15, "y":0}, {"label":"PgDn", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.25}, {"label":"A", "x":2.5, "y":1}, {"label":"S", "x":3.5, "y":1}, {"label":"D", "x":4.5, "y":1}, {"label":"F", "x":5.5, "y":1}, {"label":"G", "x":6.5, "y":1}, {"label":"H", "x":9.25, "y":1}, {"label":"J", "x":10.25, "y":1}, {"label":"K", "x":11.25, "y":1}, {"label":"L", "x":12.25, "y":1}, {"label":":", "x":13.25, "y":1}, {"label":"\"", "x":14.25, "y":1, "w":1.75}, {"label":"Shift", "x":1.25, "y":2, "w":1.75}, {"label":"Z", "x":3, "y":2}, {"label":"X", "x":4, "y":2}, {"label":"C", "x":5, "y":2}, {"label":"V", "x":6, "y":2}, {"label":"B", "x":7, "y":2}, {"label":"B", "x":8.75, "y":2}, {"label":"N", "x":9.75, "y":2}, {"label":"M", "x":10.75, "y":2}, {"label":"<", "x":11.75, "y":2}, {"label":">", "x":12.75, "y":2}, {"label":"?", "x":13.75, "y":2, "w":1.25}, {"label":"Adjust", "x":15, "y":2}, {"label":"Win", "x":1.25, "y":3, "w":1.5}, {"label":"Alt", "x":3.75, "y":3, "w":1.5}, {"label":"Lower", "x":5.25, "y":3, "w":2}, {"x":7.25, "y":3}, {"label":"Raise", "x":8.75, "y":3, "w":1.75}, {"label":"Enter", "x":10.5, "y":3}, {"label":"Alt", "x":11.5, "y":3, "w":1.5}, {"label":"Ctrl", "x":14.5, "y":3, "w":1.5}] + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 1.25, "y": 0}, + {"matrix": [0, 2], "x": 2.25, "y": 0}, + {"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": [0, 6], "x": 6.25, "y": 0}, + + {"matrix": [0, 7], "x": 9, "y": 0}, + {"matrix": [0, 8], "x": 10, "y": 0}, + {"matrix": [0, 9], "x": 11, "y": 0}, + {"matrix": [0, 10], "x": 12, "y": 0}, + {"matrix": [0, 11], "x": 13, "y": 0}, + {"matrix": [0, 12], "x": 14, "y": 0}, + {"matrix": [0, 13], "x": 15, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + + {"matrix": [1, 1], "x": 1.25, "y": 1, "w": 1.25}, + {"matrix": [1, 2], "x": 2.5, "y": 1}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1}, + {"matrix": [1, 5], "x": 5.5, "y": 1}, + {"matrix": [1, 6], "x": 6.5, "y": 1}, + + {"matrix": [1, 7], "x": 9.25, "y": 1}, + {"matrix": [1, 8], "x": 10.25, "y": 1}, + {"matrix": [1, 9], "x": 11.25, "y": 1}, + {"matrix": [1, 10], "x": 12.25, "y": 1}, + {"matrix": [1, 11], "x": 13.25, "y": 1}, + {"matrix": [1, 13], "x": 14.25, "y": 1, "w": 1.75}, + + {"matrix": [2, 1], "x": 1.25, "y": 2, "w": 1.75}, + {"matrix": [2, 2], "x": 3, "y": 2}, + {"matrix": [2, 3], "x": 4, "y": 2}, + {"matrix": [2, 4], "x": 5, "y": 2}, + {"matrix": [2, 5], "x": 6, "y": 2}, + {"matrix": [2, 6], "x": 7, "y": 2}, + + {"matrix": [2, 7], "x": 8.75, "y": 2}, + {"matrix": [2, 8], "x": 9.75, "y": 2}, + {"matrix": [2, 9], "x": 10.75, "y": 2}, + {"matrix": [2, 10], "x": 11.75, "y": 2}, + {"matrix": [2, 11], "x": 12.75, "y": 2}, + {"matrix": [2, 12], "x": 13.75, "y": 2, "w": 1.25}, + {"matrix": [2, 13], "x": 15, "y": 2}, + + {"matrix": [3, 1], "x": 1.25, "y": 3, "w": 1.5}, + {"matrix": [3, 3], "x": 3.75, "y": 3, "w": 1.5}, + {"matrix": [3, 5], "x": 5.25, "y": 3, "w": 2}, + {"matrix": [3, 6], "x": 7.25, "y": 3}, + + {"matrix": [3, 7], "x": 8.75, "y": 3, "w": 1.75}, + {"matrix": [3, 9], "x": 10.5, "y": 3}, + {"matrix": [3, 10], "x": 11.5, "y": 3, "w": 1.5}, + {"matrix": [3, 13], "x": 14.5, "y": 3, "w": 1.5} + ] } } } diff --git a/keyboards/satt/vision/vision.h b/keyboards/satt/vision/vision.h deleted file mode 100644 index 4906d4fcd1..0000000000 --- a/keyboards/satt/vision/vision.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2020 SatT - * - * 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 LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K113, \ - K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K301, K303, K305, K306, K307, K309, K310, K313 \ -) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, KC_NO, K113 }, \ - { KC_NO, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ - { KC_NO, K301, KC_NO, K303, KC_NO, K305, K306, K307, KC_NO, K309, K310, KC_NO, KC_NO, K313 }, \ -} |