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/dtisaac/cg108 | |
parent | 941e159a28f1bdbdd913654c4f9a14291f8d5299 (diff) |
Move single `LAYOUT`s to data driven (#20365)
Diffstat (limited to 'keyboards/dtisaac/cg108')
-rw-r--r-- | keyboards/dtisaac/cg108/cg108.h | 49 | ||||
-rw-r--r-- | keyboards/dtisaac/cg108/info.json | 257 |
2 files changed, 138 insertions, 168 deletions
diff --git a/keyboards/dtisaac/cg108/cg108.h b/keyboards/dtisaac/cg108/cg108.h deleted file mode 100644 index 3532193392..0000000000 --- a/keyboards/dtisaac/cg108/cg108.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright 2021 DTIsaac - * - * 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. - */ -// default keymap: all 117 keys with ANSI Enter -#define LAYOUT( \ - K000, K001, K002, K003, K300, K301, K302, K303, K306, K307, K308, K309, K310, K004, K005, K006, K007, K008, K009, K010, \ - K100, K101, K102, K103, K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K104, K105, K106, K107, K108, K109, K110, \ - K200, K201, K202, K203, K500, K501, K502, K503, K505, K506, K507, K508, K509, K510, K204, K205, K206, K207, K208, K209, K210, \ - K800, K801, K802, K803, K600, K601, K602, K603, K606, K607, K608, K609, K610, K807, K808, K809, K810, \ - K900, K901, K902, K903, K700, K701, K702, K703, K705, K706, K707, K708, K709, K710, K906, K907, K908, K909, K910, \ - KA00, KA01, KA02, KA03, K804, K805, K806, K604, K605, K904, K905, KA04, KA05, KA06, KA07, KA08, KA09, KA10 \ -) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210 }, \ - { K300, K301, K302, K303, KC_NO, KC_NO, K306, K307, K308, K309, K310 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410 }, \ - { K500, K501, K502, K503, KC_NO, K505, K506, K507, K508, K509, K510 }, \ - { K600, K601, K602, K603, K604, K605, K606, K607, K608, K609, K610 }, \ - { K700, K701, K702, K703, KC_NO, K705, K706, K707, K708, K709, K710 }, \ - { K800, K801, K802, K803, K804, K805, K806, K807, K808, K809, K810 }, \ - { K900, K901, K902, K903, K904, K905, K906, K907, K908, K909, K910 }, \ - { KA00, KA01, KA02, KA03, KA04, KA05, KA06, KA07, KA08, KA09, KA10 } \ -} diff --git a/keyboards/dtisaac/cg108/info.json b/keyboards/dtisaac/cg108/info.json index 4da08a7a74..c657c029eb 100644 --- a/keyboards/dtisaac/cg108/info.json +++ b/keyboards/dtisaac/cg108/info.json @@ -21,127 +21,146 @@ }, "processor": "atmega32u4", "bootloader": "atmel-dfu", - "layouts": { + "layouts": { "LAYOUT": { "layout": [ - {"label":"K000", "x":0, "y":0}, - {"label":"K001", "x":2, "y":0}, - {"label":"K002", "x":3, "y":0}, - {"label":"K003", "x":4, "y":0}, - {"label":"K300", "x":5, "y":0}, - {"label":"K301", "x":6.5, "y":0}, - {"label":"K302", "x":7.5, "y":0}, - {"label":"K303", "x":8.5, "y":0}, - {"label":"K306", "x":9.5, "y":0}, - {"label":"K307", "x":11, "y":0}, - {"label":"K308", "x":12, "y":0}, - {"label":"K309", "x":13, "y":0}, - {"label":"K310", "x":14, "y":0}, - {"label":"K004", "x":15.25, "y":0}, - {"label":"K005", "x":16.25, "y":0}, - {"label":"K006", "x":17.25, "y":0}, - {"label":"K007", "x":18.5, "y":0}, - {"label":"K008", "x":19.5, "y":0}, - {"label":"K009", "x":20.5, "y":0}, - {"label":"K010", "x":21.5, "y":0}, - {"label":"K100", "x":0, "y":1.5}, - {"label":"K101", "x":1, "y":1.5}, - {"label":"K102", "x":2, "y":1.5}, - {"label":"K103", "x":3, "y":1.5}, - {"label":"K400", "x":4, "y":1.5}, - {"label":"K401", "x":5, "y":1.5}, - {"label":"K402", "x":6, "y":1.5}, - {"label":"K403", "x":7, "y":1.5}, - {"label":"K404", "x":8, "y":1.5}, - {"label":"K405", "x":9, "y":1.5}, - {"label":"K406", "x":10, "y":1.5}, - {"label":"K407", "x":11, "y":1.5}, - {"label":"K408", "x":12, "y":1.5}, - {"label":"K409", "x":13, "y":1.5}, - {"label":"K410", "x":14, "y":1.5}, - {"label":"K104", "x":15.25, "y":1.5}, - {"label":"K105", "x":16.25, "y":1.5}, - {"label":"K106", "x":17.25, "y":1.5}, - {"label":"K107", "x":18.5, "y":1.5}, - {"label":"K108", "x":19.5, "y":1.5}, - {"label":"K109", "x":20.5, "y":1.5}, - {"label":"K110", "x":21.5, "y":1.5}, - {"label":"K200", "x":0, "y":2.5, "w":1.5}, - {"label":"K201", "x":1.5, "y":2.5}, - {"label":"K202", "x":2.5, "y":2.5}, - {"label":"K203", "x":3.5, "y":2.5}, - {"label":"K500", "x":4.5, "y":2.5}, - {"label":"K501", "x":5.5, "y":2.5}, - {"label":"K502", "x":6.5, "y":2.5}, - {"label":"K503", "x":7.5, "y":2.5}, - {"label":"K505", "x":8.5, "y":2.5}, - {"label":"K506", "x":9.5, "y":2.5}, - {"label":"K507", "x":10.5, "y":2.5}, - {"label":"K508", "x":11.5, "y":2.5}, - {"label":"K509", "x":12.5, "y":2.5}, - {"label":"K510", "x":13.5, "y":2.5, "w":1.5}, - {"label":"K204", "x":15.25, "y":2.5}, - {"label":"K205", "x":16.25, "y":2.5}, - {"label":"K206", "x":17.25, "y":2.5}, - {"label":"K207", "x":18.5, "y":2.5}, - {"label":"K208", "x":19.5, "y":2.5}, - {"label":"K209", "x":20.5, "y":2.5}, - {"label":"K210", "x":21.5, "y":2.5}, - {"label":"K800", "x":0, "y":3.5, "w":1.75}, - {"label":"K801", "x":1.75, "y":3.5}, - {"label":"K802", "x":2.75, "y":3.5}, - {"label":"K803", "x":3.75, "y":3.5}, - {"label":"K600", "x":4.75, "y":3.5}, - {"label":"K601", "x":5.75, "y":3.5}, - {"label":"K602", "x":6.75, "y":3.5}, - {"label":"K603", "x":7.75, "y":3.5}, - {"label":"K606", "x":8.75, "y":3.5}, - {"label":"K607", "x":9.75, "y":3.5}, - {"label":"K608", "x":10.75, "y":3.5}, - {"label":"K609", "x":11.75, "y":3.5}, - {"label":"K610", "x":12.75, "y":3.5, "w":2.25}, - {"label":"K807", "x":18.5, "y":3.5}, - {"label":"K808", "x":19.5, "y":3.5}, - {"label":"K809", "x":20.5, "y":3.5}, - {"label":"K810", "x":21.5, "y":3.5}, - {"label":"K900", "x":0, "y":4.5, "w":1.25}, - {"label":"K901", "x":1.25, "y":4.5}, - {"label":"K902", "x":2.25, "y":4.5}, - {"label":"K903", "x":3.25, "y":4.5}, - {"label":"K700", "x":4.25, "y":4.5}, - {"label":"K701", "x":5.25, "y":4.5}, - {"label":"K702", "x":6.25, "y":4.5}, - {"label":"K703", "x":7.25, "y":4.5}, - {"label":"K705", "x":8.25, "y":4.5}, - {"label":"K706", "x":9.25, "y":4.5}, - {"label":"K707", "x":10.25, "y":4.5}, - {"label":"K708", "x":11.25, "y":4.5}, - {"label":"K709", "x":12.25, "y":4.5, "w":1.75}, - {"label":"K710", "x":14, "y":4.5}, - {"label":"K906", "x":16.25, "y":4.5}, - {"label":"K907", "x":18.5, "y":4.5}, - {"label":"K908", "x":19.5, "y":4.5}, - {"label":"K909", "x":20.5, "y":4.5}, - {"label":"K910", "x":21.5, "y":4.5}, - {"label":"KA00", "x":0, "y":5.5, "w":1.5}, - {"label":"KA01", "x":1.5, "y":5.5}, - {"label":"KA02", "x":2.5, "y":5.5, "w":1.5}, - {"label":"KA03", "x":4, "y":5.5}, - {"label":"K804", "x":5, "y":5.5, "w":2}, - {"label":"K805", "x":7, "y":5.5}, - {"label":"K806", "x":8, "y":5.5, "w":2}, - {"label":"K604", "x":10, "y":5.5}, - {"label":"K605", "x":11, "y":5.5, "w":1.5}, - {"label":"K904", "x":12.5, "y":5.5}, - {"label":"K905", "x":13.5, "y":5.5, "w":1.5}, - {"label":"KA04", "x":15.25, "y":5.5}, - {"label":"KA05", "x":16.25, "y":5.5}, - {"label":"KA06", "x":17.25, "y":5.5}, - {"label":"KA07", "x":18.5, "y":5.5}, - {"label":"KA08", "x":19.5, "y":5.5}, - {"label":"KA09", "x":20.5, "y":5.5}, - {"label":"KA10", "x":21.5, "y":5.5} - ] + {"matrix": [0, 0], "x": 0, "y": 0}, + + {"matrix": [0, 1], "x": 2, "y": 0}, + {"matrix": [0, 2], "x": 3, "y": 0}, + {"matrix": [0, 3], "x": 4, "y": 0}, + {"matrix": [3, 0], "x": 5, "y": 0}, + + {"matrix": [3, 1], "x": 6.5, "y": 0}, + {"matrix": [3, 2], "x": 7.5, "y": 0}, + {"matrix": [3, 3], "x": 8.5, "y": 0}, + {"matrix": [3, 6], "x": 9.5, "y": 0}, + + {"matrix": [3, 7], "x": 11, "y": 0}, + {"matrix": [3, 8], "x": 12, "y": 0}, + {"matrix": [3, 9], "x": 13, "y": 0}, + {"matrix": [3, 10], "x": 14, "y": 0}, + + {"matrix": [0, 4], "x": 15.25, "y": 0}, + {"matrix": [0, 5], "x": 16.25, "y": 0}, + {"matrix": [0, 6], "x": 17.25, "y": 0}, + + {"matrix": [0, 7], "x": 18.5, "y": 0}, + {"matrix": [0, 8], "x": 19.5, "y": 0}, + {"matrix": [0, 9], "x": 20.5, "y": 0}, + {"matrix": [0, 10], "x": 21.5, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1.5}, + {"matrix": [1, 1], "x": 1, "y": 1.5}, + {"matrix": [1, 2], "x": 2, "y": 1.5}, + {"matrix": [1, 3], "x": 3, "y": 1.5}, + {"matrix": [4, 0], "x": 4, "y": 1.5}, + {"matrix": [4, 1], "x": 5, "y": 1.5}, + {"matrix": [4, 2], "x": 6, "y": 1.5}, + {"matrix": [4, 3], "x": 7, "y": 1.5}, + {"matrix": [4, 4], "x": 8, "y": 1.5}, + {"matrix": [4, 5], "x": 9, "y": 1.5}, + {"matrix": [4, 6], "x": 10, "y": 1.5}, + {"matrix": [4, 7], "x": 11, "y": 1.5}, + {"matrix": [4, 8], "x": 12, "y": 1.5}, + {"matrix": [4, 9], "x": 13, "y": 1.5}, + {"matrix": [4, 10], "x": 14, "y": 1.5}, + + {"matrix": [1, 4], "x": 15.25, "y": 1.5}, + {"matrix": [1, 5], "x": 16.25, "y": 1.5}, + {"matrix": [1, 6], "x": 17.25, "y": 1.5}, + + {"matrix": [1, 7], "x": 18.5, "y": 1.5}, + {"matrix": [1, 8], "x": 19.5, "y": 1.5}, + {"matrix": [1, 9], "x": 20.5, "y": 1.5}, + {"matrix": [1, 10], "x": 21.5, "y": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2.5, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.5}, + {"matrix": [2, 2], "x": 2.5, "y": 2.5}, + {"matrix": [2, 3], "x": 3.5, "y": 2.5}, + {"matrix": [5, 0], "x": 4.5, "y": 2.5}, + {"matrix": [5, 1], "x": 5.5, "y": 2.5}, + {"matrix": [5, 2], "x": 6.5, "y": 2.5}, + {"matrix": [5, 3], "x": 7.5, "y": 2.5}, + {"matrix": [5, 5], "x": 8.5, "y": 2.5}, + {"matrix": [5, 6], "x": 9.5, "y": 2.5}, + {"matrix": [5, 7], "x": 10.5, "y": 2.5}, + {"matrix": [5, 8], "x": 11.5, "y": 2.5}, + {"matrix": [5, 9], "x": 12.5, "y": 2.5}, + {"matrix": [5, 10], "x": 13.5, "y": 2.5, "w": 1.5}, + + {"matrix": [2, 4], "x": 15.25, "y": 2.5}, + {"matrix": [2, 5], "x": 16.25, "y": 2.5}, + {"matrix": [2, 6], "x": 17.25, "y": 2.5}, + + {"matrix": [2, 7], "x": 18.5, "y": 2.5}, + {"matrix": [2, 8], "x": 19.5, "y": 2.5}, + {"matrix": [2, 9], "x": 20.5, "y": 2.5}, + {"matrix": [2, 10], "x": 21.5, "y": 2.5}, + + {"matrix": [8, 0], "x": 0, "y": 3.5, "w": 1.75}, + {"matrix": [8, 1], "x": 1.75, "y": 3.5}, + {"matrix": [8, 2], "x": 2.75, "y": 3.5}, + {"matrix": [8, 3], "x": 3.75, "y": 3.5}, + {"matrix": [6, 0], "x": 4.75, "y": 3.5}, + {"matrix": [6, 1], "x": 5.75, "y": 3.5}, + {"matrix": [6, 2], "x": 6.75, "y": 3.5}, + {"matrix": [6, 3], "x": 7.75, "y": 3.5}, + {"matrix": [6, 6], "x": 8.75, "y": 3.5}, + {"matrix": [6, 7], "x": 9.75, "y": 3.5}, + {"matrix": [6, 8], "x": 10.75, "y": 3.5}, + {"matrix": [6, 9], "x": 11.75, "y": 3.5}, + {"matrix": [6, 10], "x": 12.75, "y": 3.5, "w": 2.25}, + + {"matrix": [8, 7], "x": 18.5, "y": 3.5}, + {"matrix": [8, 8], "x": 19.5, "y": 3.5}, + {"matrix": [8, 9], "x": 20.5, "y": 3.5}, + {"matrix": [8, 10], "x": 21.5, "y": 3.5}, + + {"matrix": [9, 0], "x": 0, "y": 4.5, "w": 1.25}, + {"matrix": [9, 1], "x": 1.25, "y": 4.5}, + {"matrix": [9, 2], "x": 2.25, "y": 4.5}, + {"matrix": [9, 3], "x": 3.25, "y": 4.5}, + {"matrix": [7, 0], "x": 4.25, "y": 4.5}, + {"matrix": [7, 1], "x": 5.25, "y": 4.5}, + {"matrix": [7, 2], "x": 6.25, "y": 4.5}, + {"matrix": [7, 3], "x": 7.25, "y": 4.5}, + {"matrix": [7, 5], "x": 8.25, "y": 4.5}, + {"matrix": [7, 6], "x": 9.25, "y": 4.5}, + {"matrix": [7, 7], "x": 10.25, "y": 4.5}, + {"matrix": [7, 8], "x": 11.25, "y": 4.5}, + {"matrix": [7, 9], "x": 12.25, "y": 4.5, "w": 1.75}, + {"matrix": [7, 10], "x": 14, "y": 4.5}, + + {"matrix": [9, 6], "x": 16.25, "y": 4.5}, + + {"matrix": [9, 7], "x": 18.5, "y": 4.5}, + {"matrix": [9, 8], "x": 19.5, "y": 4.5}, + {"matrix": [9, 9], "x": 20.5, "y": 4.5}, + {"matrix": [9, 10], "x": 21.5, "y": 4.5}, + + {"matrix": [10, 0], "x": 0, "y": 5.5, "w": 1.5}, + {"matrix": [10, 1], "x": 1.5, "y": 5.5}, + {"matrix": [10, 2], "x": 2.5, "y": 5.5, "w": 1.5}, + {"matrix": [10, 3], "x": 4, "y": 5.5}, + {"matrix": [8, 4], "x": 5, "y": 5.5, "w": 2}, + {"matrix": [8, 5], "x": 7, "y": 5.5}, + {"matrix": [8, 6], "x": 8, "y": 5.5, "w": 2}, + {"matrix": [6, 4], "x": 10, "y": 5.5}, + {"matrix": [6, 5], "x": 11, "y": 5.5, "w": 1.5}, + {"matrix": [9, 4], "x": 12.5, "y": 5.5}, + {"matrix": [9, 5], "x": 13.5, "y": 5.5, "w": 1.5}, + + {"matrix": [10, 4], "x": 15.25, "y": 5.5}, + {"matrix": [10, 5], "x": 16.25, "y": 5.5}, + {"matrix": [10, 6], "x": 17.25, "y": 5.5}, + + {"matrix": [10, 7], "x": 18.5, "y": 5.5}, + {"matrix": [10, 8], "x": 19.5, "y": 5.5}, + {"matrix": [10, 9], "x": 20.5, "y": 5.5}, + {"matrix": [10, 10], "x": 21.5, "y": 5.5} + ] } } } |