diff options
author | Ryan <fauxpark@gmail.com> | 2023-04-27 07:45:43 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-27 07:45:43 +1000 |
commit | 4871f651c5328cc8c16d1ec991f3e865094b24c8 (patch) | |
tree | cdcda3f68ab91319bc482f69c008396d66492c8b /keyboards/pluckey | |
parent | 67e18c0d6bea880b989104b0a0250c85902b1a75 (diff) |
Move remaining `LAYOUT_all`s to data driven (#20463)
Diffstat (limited to 'keyboards/pluckey')
-rw-r--r-- | keyboards/pluckey/info.json | 294 | ||||
-rw-r--r-- | keyboards/pluckey/pluckey.c | 2 | ||||
-rw-r--r-- | keyboards/pluckey/pluckey.h | 81 |
3 files changed, 153 insertions, 224 deletions
diff --git a/keyboards/pluckey/info.json b/keyboards/pluckey/info.json index 5b559d48b7..3668fc9a2b 100644 --- a/keyboards/pluckey/info.json +++ b/keyboards/pluckey/info.json @@ -36,152 +36,162 @@ "layouts": { "LAYOUT_all": { "layout": [ - {"label":"Esc", "x":0, "y":0.625, "w":1.5}, - {"label":"1!", "x":1.5, "y":0.625}, - {"label":"2@", "x":2.5, "y":0.125}, - {"label":"3#", "x":3.5, "y":0}, - {"label":"4$", "x":4.5, "y":0.125}, - {"label":"5%", "x":5.5, "y":0.25}, - {"label":"-_", "x":6.5, "y":0.25}, - {"label":"=+", "x":12, "y":0.25}, - {"label":"6^", "x":13, "y":0.25}, - {"label":"7&", "x":14, "y":0.125}, - {"label":"8*", "x":15, "y":0}, - {"label":"9(", "x":16, "y":0.125}, - {"label":"0)", "x":17, "y":0.625}, - {"label":"`~", "x":18, "y":0.625, "w":1.5}, - - {"label":"Tab", "x":0, "y":1.625, "w":1.5}, - {"label":"Q", "x":1.5, "y":1.625}, - {"label":"W", "x":2.5, "y":1.125}, - {"label":"E", "x":3.5, "y":1}, - {"label":"R", "x":4.5, "y":1.125}, - {"label":"T", "x":5.5, "y":1.25}, - {"label":"[{", "x":6.5, "y":1.25}, - {"label":"]}", "x":12, "y":1.25}, - {"label":"Y", "x":13, "y":1.25}, - {"label":"U", "x":14, "y":1.125}, - {"label":"I", "x":16, "y":1.125}, - {"label":"O", "x":15, "y":1}, - {"label":"P", "x":17, "y":1.625}, - {"label":"\\|", "x":18, "y":1.625, "w":1.5}, - - {"label":"Ctrl", "x":0, "y":2.625, "w":1.5}, - {"label":"A", "x":1.5, "y":2.625}, - {"label":"S", "x":2.5, "y":2.125}, - {"label":"D", "x":3.5, "y":2}, - {"label":"F", "x":4.5, "y":2.125}, - {"label":"G", "x":5.5, "y":2.25}, - {"label":"(", "x":6.5, "y":2.25}, - {"label":")", "x":12, "y":2.25}, - {"label":"H", "x":13, "y":2.25}, - {"label":"J", "x":14, "y":2.125}, - {"label":"K", "x":16, "y":2.125}, - {"label":"L", "x":15, "y":2}, - {"label":";:", "x":17, "y":2.625}, - {"label":"'\"", "x":18, "y":2.625, "w":1.5}, - - {"label":"Shift", "x":0, "y":3.625, "w":1.5}, - {"label":"Z", "x":1.5, "y":3.625}, - {"label":"X", "x":2.5, "y":3.125}, - {"label":"C", "x":3.5, "y":3}, - {"label":"V", "x":4.5, "y":3.125}, - {"label":"B", "x":5.5, "y":3.25}, - {"label":"{", "x":6.5, "y":3.25}, - {"label":"Home", "x":7.5, "y":3.75}, - {"label":"End", "x":11, "y":3.75}, - {"label":"}", "x":12, "y":3.25}, - {"label":"N", "x":13, "y":3.25}, - {"label":"M", "x":14, "y":3.125}, - {"label":",<", "x":15, "y":3}, - {"label":".>", "x":16, "y":3.125}, - {"label":"/?", "x":17, "y":3.625}, - {"label":"Shift", "x":18, "y":3.625, "w":1.5}, - - {"label":"GUI", "x":2.5, "y":4.125}, - {"label":"Alt", "x":3.5, "y":4}, - {"label":"Lower", "x":4.5, "y":4.125}, - {"label":"Space", "x":5.75, "y":4.5, "w":1.5}, - {"label":"Backspace", "x":7.25, "y":4.75}, - {"label":"Enter", "x":11.25, "y":4.75}, - {"label":"Space", "x":12.25, "y":4.5, "w":1.5}, - {"label":"Raise", "x":14, "y":4.125}, - {"label":"Alt", "x":15, "y":4}, - {"label":"MEH", "x":16, "y":4.125} + {"matrix": [0, 0], "x": 0, "y": 0.625, "w": 1.5}, + {"matrix": [0, 1], "x": 1.5, "y": 0.625}, + {"matrix": [0, 2], "x": 2.5, "y": 0.125}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [0, 4], "x": 4.5, "y": 0.125}, + {"matrix": [0, 5], "x": 5.5, "y": 0.25}, + {"matrix": [0, 6], "x": 6.5, "y": 0.25}, + + {"matrix": [5, 6], "x": 12, "y": 0.25}, + {"matrix": [5, 5], "x": 13, "y": 0.25}, + {"matrix": [5, 4], "x": 14, "y": 0.125}, + {"matrix": [5, 3], "x": 15, "y": 0}, + {"matrix": [5, 2], "x": 16, "y": 0.125}, + {"matrix": [5, 1], "x": 17, "y": 0.625}, + {"matrix": [5, 0], "x": 18, "y": 0.625, "w": 1.5}, + + {"matrix": [1, 0], "x": 0, "y": 1.625, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1.625}, + {"matrix": [1, 2], "x": 2.5, "y": 1.125}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1.125}, + {"matrix": [1, 5], "x": 5.5, "y": 1.25}, + {"matrix": [1, 6], "x": 6.5, "y": 1.25}, + + {"matrix": [6, 6], "x": 12, "y": 1.25}, + {"matrix": [6, 5], "x": 13, "y": 1.25}, + {"matrix": [6, 4], "x": 14, "y": 1.125}, + {"matrix": [6, 3], "x": 16, "y": 1.125}, + {"matrix": [6, 2], "x": 15, "y": 1}, + {"matrix": [6, 1], "x": 17, "y": 1.625}, + {"matrix": [6, 0], "x": 18, "y": 1.625, "w": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2.625, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.625}, + {"matrix": [2, 2], "x": 2.5, "y": 2.125}, + {"matrix": [2, 3], "x": 3.5, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2.125}, + {"matrix": [2, 5], "x": 5.5, "y": 2.25}, + {"matrix": [2, 6], "x": 6.5, "y": 2.25}, + + {"matrix": [7, 6], "x": 12, "y": 2.25}, + {"matrix": [7, 5], "x": 13, "y": 2.25}, + {"matrix": [7, 4], "x": 14, "y": 2.125}, + {"matrix": [7, 3], "x": 16, "y": 2.125}, + {"matrix": [7, 2], "x": 15, "y": 2}, + {"matrix": [7, 1], "x": 17, "y": 2.625}, + {"matrix": [7, 0], "x": 18, "y": 2.625, "w": 1.5}, + + {"matrix": [3, 0], "x": 0, "y": 3.625, "w": 1.5}, + {"matrix": [3, 1], "x": 1.5, "y": 3.625}, + {"matrix": [3, 2], "x": 2.5, "y": 3.125}, + {"matrix": [3, 3], "x": 3.5, "y": 3}, + {"matrix": [3, 4], "x": 4.5, "y": 3.125}, + {"matrix": [3, 5], "x": 5.5, "y": 3.25}, + {"matrix": [3, 6], "x": 6.5, "y": 3.25}, + {"matrix": [4, 1], "x": 7.5, "y": 3.75}, + + {"matrix": [9, 1], "x": 11, "y": 3.75}, + {"matrix": [8, 6], "x": 12, "y": 3.25}, + {"matrix": [8, 5], "x": 13, "y": 3.25}, + {"matrix": [8, 4], "x": 14, "y": 3.125}, + {"matrix": [8, 3], "x": 15, "y": 3}, + {"matrix": [8, 2], "x": 16, "y": 3.125}, + {"matrix": [8, 1], "x": 17, "y": 3.625}, + {"matrix": [8, 0], "x": 18, "y": 3.625, "w": 1.5}, + + {"matrix": [4, 2], "x": 2.5, "y": 4.125}, + {"matrix": [4, 3], "x": 3.5, "y": 4}, + {"matrix": [4, 4], "x": 4.5, "y": 4.125}, + {"matrix": [4, 5], "x": 5.75, "y": 4.5, "w": 1.5}, + {"matrix": [4, 6], "x": 7.25, "y": 4.75}, + + {"matrix": [9, 6], "x": 11.25, "y": 4.75}, + {"matrix": [9, 5], "x": 12.25, "y": 4.5, "w": 1.5}, + {"matrix": [9, 4], "x": 14, "y": 4.125}, + {"matrix": [9, 3], "x": 15, "y": 4}, + {"matrix": [9, 2], "x": 16, "y": 4.125} ] }, "LAYOUT_ergo": { "layout": [ - {"label":"Esc", "x":0, "y":0.625, "w":1.5}, - {"label":"1!", "x":1.5, "y":0.625}, - {"label":"2@", "x":2.5, "y":0.125}, - {"label":"3#", "x":3.5, "y":0}, - {"label":"4$", "x":4.5, "y":0.125}, - {"label":"5%", "x":5.5, "y":0.25}, - {"label":"-_", "x":6.5, "y":0.25}, - {"label":"=+", "x":12, "y":0.25}, - {"label":"6^", "x":13, "y":0.25}, - {"label":"7&", "x":14, "y":0.125}, - {"label":"8*", "x":15, "y":0}, - {"label":"9(", "x":16, "y":0.125}, - {"label":"0)", "x":17, "y":0.625}, - {"label":"`~", "x":18, "y":0.625, "w":1.5}, - - {"label":"Tab", "x":0, "y":1.625, "w":1.5}, - {"label":"Q", "x":1.5, "y":1.625}, - {"label":"W", "x":2.5, "y":1.125}, - {"label":"E", "x":3.5, "y":1}, - {"label":"R", "x":4.5, "y":1.125}, - {"label":"T", "x":5.5, "y":1.25}, - {"label":"[{", "x":6.5, "y":1.25, "h":1.5}, - {"label":"]}", "x":12, "y":1.25, "h":1.5}, - {"label":"Y", "x":13, "y":1.25}, - {"label":"U", "x":14, "y":1.125}, - {"label":"I", "x":16, "y":1.125}, - {"label":"O", "x":15, "y":1}, - {"label":"P", "x":17, "y":1.625}, - {"label":"\\|", "x":18, "y":1.625, "w":1.5}, - - {"label":"Ctrl", "x":0, "y":2.625, "w":1.5}, - {"label":"A", "x":1.5, "y":2.625}, - {"label":"S", "x":2.5, "y":2.125}, - {"label":"D", "x":3.5, "y":2}, - {"label":"F", "x":4.5, "y":2.125}, - {"label":"G", "x":5.5, "y":2.25}, - {"label":"H", "x":13, "y":2.25}, - {"label":"J", "x":14, "y":2.125}, - {"label":"K", "x":16, "y":2.125}, - {"label":"L", "x":15, "y":2}, - {"label":";:", "x":17, "y":2.625}, - {"label":"'\"", "x":18, "y":2.625, "w":1.5}, - - {"label":"Shift", "x":0, "y":3.625, "w":1.5}, - {"label":"Z", "x":1.5, "y":3.625}, - {"label":"X", "x":2.5, "y":3.125}, - {"label":"C", "x":3.5, "y":3}, - {"label":"V", "x":4.5, "y":3.125}, - {"label":"B", "x":5.5, "y":3.25}, - {"label":"(", "x":6.5, "y":2.75, "h":1.5}, - {"label":"Home", "x":7.5, "y":3.75}, - {"label":"End", "x":11, "y":3.75}, - {"label":")", "x":12, "y":2.75, "h":1.5}, - {"label":"N", "x":13, "y":3.25}, - {"label":"M", "x":14, "y":3.125}, - {"label":",<", "x":15, "y":3}, - {"label":".>", "x":16, "y":3.125}, - {"label":"/?", "x":17, "y":3.625}, - {"label":"Shift", "x":18, "y":3.625, "w":1.5}, - - {"label":"GUI", "x":2.5, "y":4.125}, - {"label":"Alt", "x":3.5, "y":4}, - {"label":"Lower", "x":4.5, "y":4.125}, - {"label":"Space", "x":5.75, "y":4.5, "w":1.5}, - {"label":"Backspace", "x":7.25, "y":4.75}, - {"label":"Enter", "x":11.25, "y":4.75}, - {"label":"Space", "x":12.25, "y":4.5, "w":1.5}, - {"label":"Raise", "x":14, "y":4.125}, - {"label":"Alt", "x":15, "y":4}, - {"label":"MEH", "x":16, "y":4.125} + {"matrix": [0, 0], "x": 0, "y": 0.625, "w": 1.5}, + {"matrix": [0, 1], "x": 1.5, "y": 0.625}, + {"matrix": [0, 2], "x": 2.5, "y": 0.125}, + {"matrix": [0, 3], "x": 3.5, "y": 0}, + {"matrix": [0, 4], "x": 4.5, "y": 0.125}, + {"matrix": [0, 5], "x": 5.5, "y": 0.25}, + {"matrix": [0, 6], "x": 6.5, "y": 0.25}, + + {"matrix": [5, 6], "x": 12, "y": 0.25}, + {"matrix": [5, 5], "x": 13, "y": 0.25}, + {"matrix": [5, 4], "x": 14, "y": 0.125}, + {"matrix": [5, 3], "x": 15, "y": 0}, + {"matrix": [5, 2], "x": 16, "y": 0.125}, + {"matrix": [5, 1], "x": 17, "y": 0.625}, + {"matrix": [5, 0], "x": 18, "y": 0.625, "w": 1.5}, + + {"matrix": [1, 0], "x": 0, "y": 1.625, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1.625}, + {"matrix": [1, 2], "x": 2.5, "y": 1.125}, + {"matrix": [1, 3], "x": 3.5, "y": 1}, + {"matrix": [1, 4], "x": 4.5, "y": 1.125}, + {"matrix": [1, 5], "x": 5.5, "y": 1.25}, + {"matrix": [1, 6], "x": 6.5, "y": 1.25, "h": 1.5}, + + {"matrix": [6, 6], "x": 12, "y": 1.25, "h": 1.5}, + {"matrix": [6, 5], "x": 13, "y": 1.25}, + {"matrix": [6, 4], "x": 14, "y": 1.125}, + {"matrix": [6, 3], "x": 16, "y": 1.125}, + {"matrix": [6, 2], "x": 15, "y": 1}, + {"matrix": [6, 1], "x": 17, "y": 1.625}, + {"matrix": [6, 0], "x": 18, "y": 1.625, "w": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2.625, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.625}, + {"matrix": [2, 2], "x": 2.5, "y": 2.125}, + {"matrix": [2, 3], "x": 3.5, "y": 2}, + {"matrix": [2, 4], "x": 4.5, "y": 2.125}, + {"matrix": [2, 5], "x": 5.5, "y": 2.25}, + + {"matrix": [7, 5], "x": 13, "y": 2.25}, + {"matrix": [7, 4], "x": 14, "y": 2.125}, + {"matrix": [7, 3], "x": 16, "y": 2.125}, + {"matrix": [7, 2], "x": 15, "y": 2}, + {"matrix": [7, 1], "x": 17, "y": 2.625}, + {"matrix": [7, 0], "x": 18, "y": 2.625, "w": 1.5}, + + {"matrix": [3, 0], "x": 0, "y": 3.625, "w": 1.5}, + {"matrix": [3, 1], "x": 1.5, "y": 3.625}, + {"matrix": [3, 2], "x": 2.5, "y": 3.125}, + {"matrix": [3, 3], "x": 3.5, "y": 3}, + {"matrix": [3, 4], "x": 4.5, "y": 3.125}, + {"matrix": [3, 5], "x": 5.5, "y": 3.25}, + {"matrix": [3, 6], "x": 6.5, "y": 2.75, "h": 1.5}, + {"matrix": [4, 1], "x": 7.5, "y": 3.75}, + + {"matrix": [9, 1], "x": 11, "y": 3.75}, + {"matrix": [8, 6], "x": 12, "y": 2.75, "h": 1.5}, + {"matrix": [8, 5], "x": 13, "y": 3.25}, + {"matrix": [8, 4], "x": 14, "y": 3.125}, + {"matrix": [8, 3], "x": 15, "y": 3}, + {"matrix": [8, 2], "x": 16, "y": 3.125}, + {"matrix": [8, 1], "x": 17, "y": 3.625}, + {"matrix": [8, 0], "x": 18, "y": 3.625, "w": 1.5}, + + {"matrix": [4, 2], "x": 2.5, "y": 4.125}, + {"matrix": [4, 3], "x": 3.5, "y": 4}, + {"matrix": [4, 4], "x": 4.5, "y": 4.125}, + {"matrix": [4, 5], "x": 5.75, "y": 4.5, "w": 1.5}, + {"matrix": [4, 6], "x": 7.25, "y": 4.75}, + + {"matrix": [9, 6], "x": 11.25, "y": 4.75}, + {"matrix": [9, 5], "x": 12.25, "y": 4.5, "w": 1.5}, + {"matrix": [9, 4], "x": 14, "y": 4.125}, + {"matrix": [9, 3], "x": 15, "y": 4}, + {"matrix": [9, 2], "x": 16, "y": 4.125} ] } } diff --git a/keyboards/pluckey/pluckey.c b/keyboards/pluckey/pluckey.c index d9025726fd..d9215b9339 100644 --- a/keyboards/pluckey/pluckey.c +++ b/keyboards/pluckey/pluckey.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "pluckey.h" +#include "quantum.h" #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { diff --git a/keyboards/pluckey/pluckey.h b/keyboards/pluckey/pluckey.h deleted file mode 100644 index d7d6dc4d3a..0000000000 --- a/keyboards/pluckey/pluckey.h +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright 2021 floookay - * - * 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 XXX KC_NO - -/* - * ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ - * ┌─────┬───┤L02│L03│L04│L05│L06│ │R00│R01│R02│R03│R04├───┬─────┐ - * │L00 │L01├───┼───┼───┼───┼───┤ ┌───┐ ┌───┐ ├───┼───┼───┼───┼───┤R05│R06 │ - * ├─────┼───┤L12│L13│L14│L15│L16│ │L16│ │R10│ │R10│R11│R12│R13│R14├───┼─────┤ - * │L10 │L11├───┼───┼───┼───┼───┤ │ │ │ │ ├───┼───┼───┼───┼───┤R15│R16 │ - * ├─────┼───┤L22│L23│L24│L25│L26│ ├───┤ ├───┤ │R20│R21│R22│R23│R24├───┼─────┤ - * │L20 │L21├───┼───┼───┼───┼───┼───┐ │L36├───┐ ┌───┤R30│ ┌───┼───┼───┼───┼───┼───┤R25│R26 │ - * ├─────┼───┤L32│L33│L34│L35│L36│L41│ │ │ │ │ │ │ │R45│R30│R31│R32│R33│R34├───┼─────┤ - * │L30 │L31├───┼───┼───┼┬──┴──┬┴──┬┘ └──┬┘ ┌┘ └┐ └┬──┘ └┬──┴┬──┴──┬┼───┼───┼───┤R35│R36 │ - * └─────┴───┤L42│L43│L44││L45 │L46│ │L46│ │R40│ │R40│R41 ││R42│R43│R44├───┴─────┘ - * └───┴───┴───┘└─────┴───┘ └───┘ └───┘ └───┴─────┘└───┴───┴───┘ - */ - -/* 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_all( \ - l00, l01, l02, l03, l04, l05, l06, r00, r01, r02, r03, r04, r05, r06, \ - l10, l11, l12, l13, l14, l15, l16, r10, r11, r12, r13, r14, r15, r16, \ - l20, l21, l22, l23, l24, l25, l26, r20, r21, r22, r23, r24, r25, r26, \ - l30, l31, l32, l33, l34, l35, l36, l41, r45, r30, r31, r32, r33, r34, r35, r36, \ - l42, l43, l44, l45, l46, r40, r41, r42, r43, r44 \ -){ \ - { l00, l01, l02, l03, l04, l05, l06 }, \ - { l10, l11, l12, l13, l14, l15, l16 }, \ - { l20, l21, l22, l23, l24, l25, l26 }, \ - { l30, l31, l32, l33, l34, l35, l36 }, \ - { XXX, l41, l42, l43, l44, l45, l46 }, \ - { r06, r05, r04, r03, r02, r01, r00 }, \ - { r16, r15, r14, r13, r12, r11, r10 }, \ - { r26, r25, r24, r23, r22, r21, r20 }, \ - { r36, r35, r34, r33, r32, r31, r30 }, \ - { XXX, r45, r44, r43, r42, r41, r40 } \ -} - -#define LAYOUT_ergo( \ - l00, l01, l02, l03, l04, l05, l06, r00, r01, r02, r03, r04, r05, r06, \ - l10, l11, l12, l13, l14, l15, l16, r10, r11, r12, r13, r14, r15, r16, \ - l20, l21, l22, l23, l24, l25, r21, r22, r23, r24, r25, r26, \ - l30, l31, l32, l33, l34, l35, l36, l41, r45, r30, r31, r32, r33, r34, r35, r36, \ - l42, l43, l44, l45, l46, r40, r41, r42, r43, r44 \ -){ \ - { l00, l01, l02, l03, l04, l05, l06 }, \ - { l10, l11, l12, l13, l14, l15, l16 }, \ - { l20, l21, l22, l23, l24, l25, XXX }, \ - { l30, l31, l32, l33, l34, l35, l36 }, \ - { XXX, l41, l42, l43, l44, l45, l46 }, \ - { r06, r05, r04, r03, r02, r01, r00 }, \ - { r16, r15, r14, r13, r12, r11, r10 }, \ - { r26, r25, r24, r23, r22, r21, XXX }, \ - { r36, r35, r34, r33, r32, r31, r30 }, \ - { XXX, r45, r44, r43, r42, r41, r40 } \ -} |