diff options
author | Ryan <fauxpark@gmail.com> | 2023-04-05 15:50:56 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-05 15:50:56 +1000 |
commit | 09a2b70a661323aa7ea023341bb1e9dcd3c75e24 (patch) | |
tree | e97fa9446ae698496ea4b2944f525f888fa24c7e /keyboards/phoenix | |
parent | 6847dba8af551aa0f1afbd74f77a8c49ad28e33b (diff) |
Move Alice and Ergodox layouts to data driven (#20340)
Diffstat (limited to 'keyboards/phoenix')
-rw-r--r-- | keyboards/phoenix/info.json | 200 | ||||
-rw-r--r-- | keyboards/phoenix/phoenix.h | 64 |
2 files changed, 171 insertions, 93 deletions
diff --git a/keyboards/phoenix/info.json b/keyboards/phoenix/info.json index f2f82d6d7c..2079750678 100644 --- a/keyboards/phoenix/info.json +++ b/keyboards/phoenix/info.json @@ -22,49 +22,191 @@ "layouts": { "LAYOUT_ergodox": { "layout": [ - {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, - {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, - {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, - {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, - {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"matrix": [0, 0], "x": 0, "y": 0.375, "w": 1.5}, + {"matrix": [0, 1], "x": 1.5, "y": 0.375}, + {"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}, - {"x":6, "y":5}, {"x":7, "y":5}, - {"x":7, "y":6}, - {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, + {"matrix": [1, 0], "x": 0, "y": 1.375, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1.375}, + {"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": [2, 0], "x": 0, "y": 2.375, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.375}, + {"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}, - {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, - {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, - {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, - {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, - {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + {"matrix": [3, 0], "x": 0, "y": 3.375, "w": 1.5}, + {"matrix": [3, 1], "x": 1.5, "y": 3.375}, + {"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, 0], "x": 0.5, "y": 4.375}, + {"matrix": [4, 1], "x": 1.5, "y": 4.375}, + {"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}, - {"x":9, "y":5}, {"x":10, "y":5}, - {"x":9, "y":6}, - {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + {"matrix": [5, 3], "x": 6, "y": 5}, + {"matrix": [5, 4], "x": 7, "y": 5}, + + {"matrix": [5, 5], "x": 7, "y": 6}, + {"matrix": [5, 0], "x": 5, "y": 6, "h": 2}, + {"matrix": [5, 1], "x": 6, "y": 6, "h": 2}, + + {"matrix": [5, 2], "x": 7, "y": 7}, + + {"matrix": [6, 6], "x": 9.5, "y": 0.25}, + {"matrix": [6, 5], "x": 10.5, "y": 0.25}, + {"matrix": [6, 4], "x": 11.5, "y": 0.125}, + {"matrix": [6, 3], "x": 12.5, "y": 0}, + {"matrix": [6, 2], "x": 13.5, "y": 0.125}, + {"matrix": [6, 1], "x": 14.5, "y": 0.375}, + {"matrix": [6, 0], "x": 15.5, "y": 0.375, "w": 1.5}, + + {"matrix": [7, 6], "x": 9.5, "y": 1.25, "h": 1.5}, + {"matrix": [7, 5], "x": 10.5, "y": 1.25}, + {"matrix": [7, 4], "x": 11.5, "y": 1.125}, + {"matrix": [7, 3], "x": 12.5, "y": 1}, + {"matrix": [7, 2], "x": 13.5, "y": 1.125}, + {"matrix": [7, 1], "x": 14.5, "y": 1.375}, + {"matrix": [7, 0], "x": 15.5, "y": 1.375, "w": 1.5}, + + {"matrix": [8, 5], "x": 10.5, "y": 2.25}, + {"matrix": [8, 4], "x": 11.5, "y": 2.125}, + {"matrix": [8, 3], "x": 12.5, "y": 2}, + {"matrix": [8, 2], "x": 13.5, "y": 2.125}, + {"matrix": [8, 1], "x": 14.5, "y": 2.375}, + {"matrix": [8, 0], "x": 15.5, "y": 2.375, "w": 1.5}, + {"matrix": [9, 6], "x": 9.5, "y": 2.75, "h": 1.5}, + + {"matrix": [9, 5], "x": 10.5, "y": 3.25}, + {"matrix": [9, 4], "x": 11.5, "y": 3.125}, + {"matrix": [9, 3], "x": 12.5, "y": 3}, + {"matrix": [9, 2], "x": 13.5, "y": 3.125}, + {"matrix": [9, 1], "x": 14.5, "y": 3.375}, + {"matrix": [9, 0], "x": 15.5, "y": 3.375, "w": 1.5}, + + {"matrix": [10, 4], "x": 11.5, "y": 4.125}, + {"matrix": [10, 3], "x": 12.5, "y": 4}, + {"matrix": [10, 2], "x": 13.5, "y": 4.125}, + {"matrix": [10, 1], "x": 14.5, "y": 4.375}, + {"matrix": [10, 0], "x": 15.5, "y": 4.375}, + + {"matrix": [11, 4], "x": 9, "y": 5}, + {"matrix": [11, 3], "x": 10, "y": 5}, + + {"matrix": [11, 5], "x": 9, "y": 6}, + + {"matrix": [11, 2], "x": 9, "y": 7}, + + {"matrix": [11, 1], "x": 10, "y": 6, "h": 2}, + {"matrix": [11, 0], "x": 11, "y": 6, "h": 2} ] }, "LAYOUT_ergodox_pretty": { "layout": [ - {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, - {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"matrix": [0, 0], "x": 0, "y": 0.375, "w": 1.5}, + {"matrix": [0, 1], "x": 1.5, "y": 0.375}, + {"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": [6, 0], "x": 9.5, "y": 0.25}, + {"matrix": [6, 1], "x": 10.5, "y": 0.25}, + {"matrix": [6, 2], "x": 11.5, "y": 0.125}, + {"matrix": [6, 3], "x": 12.5, "y": 0}, + {"matrix": [6, 4], "x": 13.5, "y": 0.125}, + {"matrix": [6, 5], "x": 14.5, "y": 0.375}, + {"matrix": [6, 6], "x": 15.5, "y": 0.375, "w": 1.5}, + + {"matrix": [1, 0], "x": 0, "y": 1.375, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1.375}, + {"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": [7, 0], "x": 9.5, "y": 1.25, "h": 1.5}, + {"matrix": [7, 1], "x": 10.5, "y": 1.25}, + {"matrix": [7, 2], "x": 11.5, "y": 1.125}, + {"matrix": [7, 3], "x": 12.5, "y": 1}, + {"matrix": [7, 4], "x": 13.5, "y": 1.125}, + {"matrix": [7, 5], "x": 14.5, "y": 1.375}, + {"matrix": [7, 6], "x": 15.5, "y": 1.375, "w": 1.5}, + + {"matrix": [2, 0], "x": 0, "y": 2.375, "w": 1.5}, + {"matrix": [2, 1], "x": 1.5, "y": 2.375}, + {"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": [8, 0], "x": 10.5, "y": 2.25}, + {"matrix": [8, 1], "x": 11.5, "y": 2.125}, + {"matrix": [8, 2], "x": 12.5, "y": 2}, + {"matrix": [8, 3], "x": 13.5, "y": 2.125}, + {"matrix": [8, 4], "x": 14.5, "y": 2.375}, + {"matrix": [8, 5], "x": 15.5, "y": 2.375, "w": 1.5}, + + {"matrix": [3, 0], "x": 0, "y": 3.375, "w": 1.5}, + {"matrix": [3, 1], "x": 1.5, "y": 3.375}, + {"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": [9, 0], "x": 9.5, "y": 2.75, "h": 1.5}, + {"matrix": [9, 1], "x": 10.5, "y": 3.25}, + {"matrix": [9, 2], "x": 11.5, "y": 3.125}, + {"matrix": [9, 3], "x": 12.5, "y": 3}, + {"matrix": [9, 4], "x": 13.5, "y": 3.125}, + {"matrix": [9, 5], "x": 14.5, "y": 3.375}, + {"matrix": [9, 6], "x": 15.5, "y": 3.375, "w": 1.5}, + + {"matrix": [4, 0], "x": 0.5, "y": 4.375}, + {"matrix": [4, 1], "x": 1.5, "y": 4.375}, + {"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}, - {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, - {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"matrix": [10, 0], "x": 11.5, "y": 4.125}, + {"matrix": [10, 1], "x": 12.5, "y": 4}, + {"matrix": [10, 2], "x": 13.5, "y": 4.125}, + {"matrix": [10, 3], "x": 14.5, "y": 4.375}, + {"matrix": [10, 4], "x": 15.5, "y": 4.375}, - {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, - {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"matrix": [5, 3], "x": 6, "y": 5}, + {"matrix": [5, 4], "x": 7, "y": 5}, + {"matrix": [11, 4], "x": 9, "y": 5}, + {"matrix": [11, 3], "x": 10, "y": 5}, - {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, - {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"matrix": [5, 5], "x": 7, "y": 6}, + {"matrix": [11, 5], "x": 9, "y": 6}, + {"matrix": [5, 0], "x": 5, "y": 6, "h": 2}, + {"matrix": [5, 1], "x": 6, "y": 6, "h": 2}, - {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, - {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + {"matrix": [5, 2], "x": 7, "y": 7}, + {"matrix": [11, 2], "x": 9, "y": 7}, - {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, - {"x":7, "y":6}, {"x":9, "y":6}, - {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + {"matrix": [11, 1], "x": 10, "y": 6, "h": 2}, + {"matrix": [11, 0], "x": 11, "y": 6, "h": 2} ] } } diff --git a/keyboards/phoenix/phoenix.h b/keyboards/phoenix/phoenix.h index 3657ef05f0..22a25bb4bd 100644 --- a/keyboards/phoenix/phoenix.h +++ b/keyboards/phoenix/phoenix.h @@ -28,67 +28,3 @@ inline void led3_on(void) { led_pin_on(6); }; inline void led1_off(void) { led_pin_off(8); }; inline void led2_off(void) { led_pin_off(5); }; inline void led3_off(void) { led_pin_off(6); }; - -#define LAYOUT_ergodox( \ - k00,k01,k02,k03,k04,k05,k06, \ - k10,k11,k12,k13,k14,k15,k16, \ - k20,k21,k22,k23,k24,k25, \ - k30,k31,k32,k33,k34,k35,k36, \ - k40,k41,k42,k43,k44, \ - k55,k56, \ - k54, \ - k53,k52,k51, \ - \ - k07,k08,k09,k0A,k0B,k0C,k0D, \ - k17,k18,k19,k1A,k1B,k1C,k1D, \ - k28,k29,k2A,k2B,k2C,k2D, \ - k37,k38,k39,k3A,k3B,k3C,k3D, \ - k49,k4A,k4B,k4C,k4D, \ - k57,k58, \ - k59, \ - k5C,k5B,k5A ) \ - \ - /* matrix positions */ \ - { \ - { k00, k01, k02, k03, k04, k05, k06 }, \ - { k10, k11, k12, k13, k14, k15, k16 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k33, k34, k35, k36 }, \ - { k40, k41, k42, k43, k44 }, \ - { k53, k52, k51, k55, k56, k54 }, \ - \ - { k0D, k0C, k0B, k0A, k09, k08, k07 }, \ - { k1D, k1C, k1B, k1A, k19, k18, k17 }, \ - { k2D, k2C, k2B, k2A, k29, k28 }, \ - { k3D, k3C, k3B, k3A, k39, k38, k37 }, \ - { k4D, k4C, k4B, k4A, k49 }, \ - { k5A, k5B, k5C, k58, k57, k59 }, \ - } - -/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ -#define LAYOUT_ergodox_pretty( \ - 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, R20,R21,R22,R23,R24,R25, \ - L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \ - L40,L41,L42,L43,L44, R40,R41,R42,R43,R44, \ - L53,L54, R54,R53, \ - L55, R55, \ - L50,L51,L52, R52,R51,R50 ) \ - \ - /* matrix positions */ \ - { \ - { L00, L01, L02, L03, L04, L05, L06 },\ - { L10, L11, L12, L13, L14, L15, L16 },\ - { L20, L21, L22, L23, L24, L25, KC_NO },\ - { L30, L31, L32, L33, L34, L35, L36 },\ - { L40, L41, L42, L43, L44, KC_NO, KC_NO },\ - { L50, L51, L52, L53, L54, L55, KC_NO },\ - \ - { R00, R01, R02, R03, R04, R05, R06 },\ - { R10, R11, R12, R13, R14, R15, R16 },\ - { R20, R21, R22, R23, R24, R25, KC_NO },\ - { R30, R31, R32, R33, R34, R35, R36 },\ - { R40, R41, R42, R43, R44, KC_NO, KC_NO },\ - { R50, R51, R52, R53, R54, R55, KC_NO }\ - } |