diff options
author | Ryan <fauxpark@gmail.com> | 2023-04-05 15:46:59 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-05 15:46:59 +1000 |
commit | 364c06d939134184838579d4e73880f8c2f83419 (patch) | |
tree | b54be2d8a9a7ca5913774390bb0772e927d6523a /keyboards/rubi | |
parent | 06c5c028046adc0a5501f6ac51953640e2015020 (diff) |
Move small macropad-ish layouts to data driven (#20341)
Diffstat (limited to 'keyboards/rubi')
-rw-r--r-- | keyboards/rubi/info.json | 41 | ||||
-rw-r--r-- | keyboards/rubi/rubi.h | 39 |
2 files changed, 23 insertions, 57 deletions
diff --git a/keyboards/rubi/info.json b/keyboards/rubi/info.json index fec1b52ea3..d61ef34548 100644 --- a/keyboards/rubi/info.json +++ b/keyboards/rubi/info.json @@ -23,24 +23,29 @@ "layouts": { "LAYOUT": { "layout": [ - {"x":3, "y":0}, - {"x":0, "y":1.25}, - {"x":1, "y":1.25}, - {"x":2, "y":1.25}, - {"x":3, "y":1.25}, - {"x":0, "y":2.25}, - {"x":1, "y":2.25}, - {"x":2, "y":2.25}, - {"x":3, "y":2.25, "h":2}, - {"x":0, "y":3.25}, - {"x":1, "y":3.25}, - {"x":2, "y":3.25}, - {"x":0, "y":4.25}, - {"x":1, "y":4.25}, - {"x":2, "y":4.25}, - {"x":3, "y":4.25, "h":2}, - {"x":0, "y":5.25, "w":2}, - {"x":2, "y":5.25} + {"matrix": [2, 3], "x": 3, "y": 0}, + + {"matrix": [0, 0], "x": 0, "y": 1.25}, + {"matrix": [0, 1], "x": 1, "y": 1.25}, + {"matrix": [0, 2], "x": 2, "y": 1.25}, + {"matrix": [0, 3], "x": 3, "y": 1.25}, + + {"matrix": [1, 0], "x": 0, "y": 2.25}, + {"matrix": [1, 1], "x": 1, "y": 2.25}, + {"matrix": [1, 2], "x": 2, "y": 2.25}, + {"matrix": [1, 3], "x": 3, "y": 2.25, "h": 2}, + + {"matrix": [2, 0], "x": 0, "y": 3.25}, + {"matrix": [2, 1], "x": 1, "y": 3.25}, + {"matrix": [2, 2], "x": 2, "y": 3.25}, + + {"matrix": [3, 0], "x": 0, "y": 4.25}, + {"matrix": [3, 1], "x": 1, "y": 4.25}, + {"matrix": [3, 2], "x": 2, "y": 4.25}, + {"matrix": [3, 3], "x": 3, "y": 4.25, "h": 2}, + + {"matrix": [4, 1], "x": 0, "y": 5.25, "w": 2}, + {"matrix": [4, 2], "x": 2, "y": 5.25} ] } } diff --git a/keyboards/rubi/rubi.h b/keyboards/rubi/rubi.h index 17454c8c79..e7c8ae137a 100644 --- a/keyboards/rubi/rubi.h +++ b/keyboards/rubi/rubi.h @@ -60,42 +60,3 @@ uint16_t handle_encoder_press(void); void calcUpdate(void); void calcInput(char input); void calcOperands(void); - -/* 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. - */ - -/* Rubi matrix layout - * ,---------------. - * | 23| - * |---------------| - * | 00| 01| 02| 03| - * |---------------| - * | 10| 11| 12| | - * |-----------| 13| - * | 20| 21| 22| | - * |---------------| - * | 30| 31| 32| | - * |-----------| 33| - * | 41 | 42| | - * `---------------' - */ -#define LAYOUT( \ - k23, \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, \ - k30, k31, k32, k33, \ - k41, k42 \ -) { \ - { k00, k01, k02, k03 }, \ - { k10, k11, k12, k13 }, \ - { k20, k21, k22, k23 }, \ - { k30, k31, k32, k33 }, \ - { KC_NO, k41, k42, KC_NO } \ -} |