summaryrefslogtreecommitdiff
path: root/keyboards/torn
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-04-01 13:09:53 +1100
committerGitHub <noreply@github.com>2023-04-01 13:09:53 +1100
commite40b6ca3b05e50253c3f6bbc08673e1720ddd9be (patch)
tree28ff78699bb1ff96997be7d097eaad2ec4843785 /keyboards/torn
parent297779385fd53e93c33861e2d3107cb88efbde81 (diff)
Move split layouts to data driven (#20290)
Diffstat (limited to 'keyboards/torn')
-rw-r--r--keyboards/torn/info.json95
-rw-r--r--keyboards/torn/torn.h16
2 files changed, 51 insertions, 60 deletions
diff --git a/keyboards/torn/info.json b/keyboards/torn/info.json
index 32b7c90d44..c5294d14af 100644
--- a/keyboards/torn/info.json
+++ b/keyboards/torn/info.json
@@ -18,50 +18,57 @@
"layouts": {
"LAYOUT_split_3x6_4": {
"layout": [
- {"label":"SW1", "x":0, "y":0.375},
- {"label":"SW2", "x":1, "y":0.375},
- {"label":"SW3", "x":2, "y":0.125},
- {"label":"SW4", "x":3, "y":0},
- {"label":"SW5", "x":4, "y":0.125},
- {"label":"SW6", "x":5, "y":0.25},
- {"label":"SW23", "x":9, "y":0.25},
- {"label":"SW24", "x":10, "y":0.125},
- {"label":"SW25", "x":11, "y":0},
- {"label":"SW26", "x":12, "y":0.125},
- {"label":"SW27", "x":13, "y":0.375},
- {"label":"SW28", "x":14, "y":0.375},
- {"label":"SW7", "x":0, "y":1.375},
- {"label":"SW8", "x":1, "y":1.375},
- {"label":"SW9", "x":2, "y":1.125},
- {"label":"SW10", "x":3, "y":1},
- {"label":"SW11", "x":4, "y":1.125},
- {"label":"SW12", "x":5, "y":1.25},
- {"label":"SW29", "x":9, "y":1.25},
- {"label":"SW30", "x":10, "y":1.125},
- {"label":"SW31", "x":11, "y":1},
- {"label":"SW32", "x":12, "y":1.125},
- {"label":"SW33", "x":13, "y":1.375},
- {"label":"SW34", "x":14, "y":1.375},
- {"label":"SW13", "x":0, "y":2.375},
- {"label":"SW14", "x":1, "y":2.375},
- {"label":"SW15", "x":2, "y":2.125},
- {"label":"SW16", "x":3, "y":2},
- {"label":"SW17", "x":4, "y":2.125},
- {"label":"SW18", "x":5, "y":2.25},
- {"label":"SW35", "x":9, "y":2.25},
- {"label":"SW36", "x":10, "y":2.125},
- {"label":"SW37", "x":11, "y":2},
- {"label":"SW38", "x":12, "y":2.125},
- {"label":"SW39", "x":13, "y":2.375},
- {"label":"SW40", "x":14, "y":2.375},
- {"label":"SW19", "x":3, "y":3.1},
- {"label":"SW20", "x":4, "y":3.25},
- {"label":"SW21", "x":5, "y":3.4},
- {"label":"SW22", "x":6, "y":3.55},
- {"label":"SW41", "x":8, "y":3.55},
- {"label":"SW42", "x":9, "y":3.4},
- {"label":"SW43", "x":10, "y":3.25},
- {"label":"SW44", "x":11, "y":3.1}
+ {"matrix": [0, 0], "x": 0, "y": 0.375},
+ {"matrix": [0, 1], "x": 1, "y": 0.375},
+ {"matrix": [0, 2], "x": 2, "y": 0.125},
+ {"matrix": [0, 3], "x": 3, "y": 0},
+ {"matrix": [0, 4], "x": 4, "y": 0.125},
+ {"matrix": [0, 5], "x": 5, "y": 0.25},
+
+ {"matrix": [0, 6], "x": 9, "y": 0.25},
+ {"matrix": [0, 7], "x": 10, "y": 0.125},
+ {"matrix": [0, 8], "x": 11, "y": 0},
+ {"matrix": [0, 9], "x": 12, "y": 0.125},
+ {"matrix": [0, 10], "x": 13, "y": 0.375},
+ {"matrix": [0, 11], "x": 14, "y": 0.375},
+
+ {"matrix": [1, 0], "x": 0, "y": 1.375},
+ {"matrix": [1, 1], "x": 1, "y": 1.375},
+ {"matrix": [1, 2], "x": 2, "y": 1.125},
+ {"matrix": [1, 3], "x": 3, "y": 1},
+ {"matrix": [1, 4], "x": 4, "y": 1.125},
+ {"matrix": [1, 5], "x": 5, "y": 1.25},
+
+ {"matrix": [1, 6], "x": 9, "y": 1.25},
+ {"matrix": [1, 7], "x": 10, "y": 1.125},
+ {"matrix": [1, 8], "x": 11, "y": 1},
+ {"matrix": [1, 9], "x": 12, "y": 1.125},
+ {"matrix": [1, 10], "x": 13, "y": 1.375},
+ {"matrix": [1, 11], "x": 14, "y": 1.375},
+
+ {"matrix": [2, 0], "x": 0, "y": 2.375},
+ {"matrix": [2, 1], "x": 1, "y": 2.375},
+ {"matrix": [2, 2], "x": 2, "y": 2.125},
+ {"matrix": [2, 3], "x": 3, "y": 2},
+ {"matrix": [2, 4], "x": 4, "y": 2.125},
+ {"matrix": [2, 5], "x": 5, "y": 2.25},
+
+ {"matrix": [2, 6], "x": 9, "y": 2.25},
+ {"matrix": [2, 7], "x": 10, "y": 2.125},
+ {"matrix": [2, 8], "x": 11, "y": 2},
+ {"matrix": [2, 9], "x": 12, "y": 2.125},
+ {"matrix": [2, 10], "x": 13, "y": 2.375},
+ {"matrix": [2, 11], "x": 14, "y": 2.375},
+
+ {"matrix": [3, 2], "x": 3, "y": 3.1},
+ {"matrix": [3, 3], "x": 4, "y": 3.25},
+ {"matrix": [3, 4], "x": 5, "y": 3.4},
+ {"matrix": [3, 5], "x": 6, "y": 3.55},
+
+ {"matrix": [3, 6], "x": 8, "y": 3.55},
+ {"matrix": [3, 7], "x": 9, "y": 3.4},
+ {"matrix": [3, 8], "x": 10, "y": 3.25},
+ {"matrix": [3, 9], "x": 11, "y": 3.1}
]
}
}
diff --git a/keyboards/torn/torn.h b/keyboards/torn/torn.h
index c25b5c2a0c..0b4355e86a 100644
--- a/keyboards/torn/torn.h
+++ b/keyboards/torn/torn.h
@@ -19,22 +19,6 @@
#include "quantum.h"
-#define ___ KC_NO
-
-// clang-format off
-#define LAYOUT_split_3x6_4( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
- k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
- k32, k33, k34, k35, k36, k37, k38, k39 \
-) { \
- { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
- { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
- { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
- { ___, ___, k32, k33, k34, k35, k36, k37, k38, k39, ___, ___ } \
-}
-// clang-format on
-
void torn_set_led(uint8_t led, bool on);
void secondary_encoder_read(void);