From e40b6ca3b05e50253c3f6bbc08673e1720ddd9be Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 1 Apr 2023 13:09:53 +1100 Subject: Move split layouts to data driven (#20290) --- keyboards/gboards/gergoplex/gergoplex.h | 18 -------- keyboards/gboards/gergoplex/info.json | 76 +++++++++++++++++---------------- 2 files changed, 40 insertions(+), 54 deletions(-) (limited to 'keyboards/gboards/gergoplex') diff --git a/keyboards/gboards/gergoplex/gergoplex.h b/keyboards/gboards/gergoplex/gergoplex.h index eda21d2a94..549228104a 100644 --- a/keyboards/gboards/gergoplex/gergoplex.h +++ b/keyboards/gboards/gergoplex/gergoplex.h @@ -35,21 +35,3 @@ extern i2c_status_t mcp23018_status; #define OLATA 0x14 // output latch register uint8_t init_mcp23018(void); - -#define LAYOUT_split_3x5_3( \ - L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ - L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ - L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ - L30, L31, L32, R30, R31, R32 \ -) { \ - { L04, L14, L24, XXX }, \ - { L03, L13, L23, L32 }, \ - { L02, L12, L22, L31 }, \ - { L01, L11, L21, L30 }, \ - { L00, L10, L20, XXX }, \ - { R00, R10, R20, XXX }, \ - { R01, R11, R21, R30 }, \ - { R02, R12, R22, R31 }, \ - { R03, R13, R23, R32 }, \ - { R04, R14, R24, XXX } \ -} diff --git a/keyboards/gboards/gergoplex/info.json b/keyboards/gboards/gergoplex/info.json index 914832aacf..061f8ff869 100644 --- a/keyboards/gboards/gergoplex/info.json +++ b/keyboards/gboards/gergoplex/info.json @@ -14,45 +14,49 @@ "layouts": { "LAYOUT_split_3x5_3": { "layout": [ - {"label":"L00", "x":0, "y":0.25}, - {"label":"L01", "x":1, "y":0.125}, - {"label":"L02", "x":2, "y":0}, - {"label":"L03", "x":3, "y":0.125}, - {"label":"L04", "x":4, "y":0.375}, - {"label":"R00", "x":8, "y":0.375}, - {"label":"R01", "x":9, "y":0.125}, - {"label":"R02", "x":10, "y":0}, - {"label":"R03", "x":11, "y":0.125}, - {"label":"R04", "x":12, "y":0.25}, + {"matrix": [4, 0], "x": 0, "y": 0.25}, + {"matrix": [3, 0], "x": 1, "y": 0.125}, + {"matrix": [2, 0], "x": 2, "y": 0}, + {"matrix": [1, 0], "x": 3, "y": 0.125}, + {"matrix": [0, 0], "x": 4, "y": 0.375}, - {"label":"L10", "x":0, "y":1.25}, - {"label":"L11", "x":1, "y":1.125}, - {"label":"L12", "x":2, "y":1}, - {"label":"L13", "x":3, "y":1.125}, - {"label":"L14", "x":4, "y":1.375}, - {"label":"R10", "x":8, "y":1.375}, - {"label":"R11", "x":9, "y":1.125}, - {"label":"R12", "x":10, "y":1}, - {"label":"R13", "x":11, "y":1.125}, - {"label":"R14", "x":12, "y":1.25}, + {"matrix": [5, 0], "x": 8, "y": 0.375}, + {"matrix": [6, 0], "x": 9, "y": 0.125}, + {"matrix": [7, 0], "x": 10, "y": 0}, + {"matrix": [8, 0], "x": 11, "y": 0.125}, + {"matrix": [9, 0], "x": 12, "y": 0.25}, - {"label":"L20", "x":0, "y":2.25}, - {"label":"L21", "x":1, "y":2.125}, - {"label":"L22", "x":2, "y":2}, - {"label":"L23", "x":3, "y":2.125}, - {"label":"L24", "x":4, "y":2.375}, - {"label":"R20", "x":8, "y":2.375}, - {"label":"R21", "x":9, "y":2.125}, - {"label":"R22", "x":10, "y":2}, - {"label":"R23", "x":11, "y":2.125}, - {"label":"R24", "x":12, "y":2.25}, + {"matrix": [4, 1], "x": 0, "y": 1.25}, + {"matrix": [3, 1], "x": 1, "y": 1.125}, + {"matrix": [2, 1], "x": 2, "y": 1}, + {"matrix": [1, 1], "x": 3, "y": 1.125}, + {"matrix": [0, 1], "x": 4, "y": 1.375}, - {"label":"L30", "x":2, "y":3.5}, - {"label":"L31", "x":3.25, "y":3.625, "w":1.5}, - {"label":"L32", "x":5, "y":3.125, "h":2}, - {"label":"R30", "x":7, "y":3.125, "h":2}, - {"label":"R31", "x":8.25, "y":3.625, "w":1.5}, - {"label":"R32", "x":10, "y":3.5} + {"matrix": [5, 1], "x": 8, "y": 1.375}, + {"matrix": [6, 1], "x": 9, "y": 1.125}, + {"matrix": [7, 1], "x": 10, "y": 1}, + {"matrix": [8, 1], "x": 11, "y": 1.125}, + {"matrix": [9, 1], "x": 12, "y": 1.25}, + + {"matrix": [4, 2], "x": 0, "y": 2.25}, + {"matrix": [3, 2], "x": 1, "y": 2.125}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [1, 2], "x": 3, "y": 2.125}, + {"matrix": [0, 2], "x": 4, "y": 2.375}, + + {"matrix": [5, 2], "x": 8, "y": 2.375}, + {"matrix": [6, 2], "x": 9, "y": 2.125}, + {"matrix": [7, 2], "x": 10, "y": 2}, + {"matrix": [8, 2], "x": 11, "y": 2.125}, + {"matrix": [9, 2], "x": 12, "y": 2.25}, + + {"matrix": [3, 3], "x": 2, "y": 3.5}, + {"matrix": [2, 3], "x": 3.25, "y": 3.625, "w": 1.5}, + {"matrix": [1, 3], "x": 5, "y": 3.125, "h": 2}, + + {"matrix": [6, 3], "x": 7, "y": 3.125, "h": 2}, + {"matrix": [7, 3], "x": 8.25, "y": 3.625, "w": 1.5}, + {"matrix": [8, 3], "x": 10, "y": 3.5} ] } } -- cgit v1.2.3