From 364c06d939134184838579d4e73880f8c2f83419 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 5 Apr 2023 15:46:59 +1000 Subject: Move small macropad-ish layouts to data driven (#20341) --- keyboards/rubi/info.json | 41 +++++++++++++++++++++++------------------ keyboards/rubi/rubi.h | 39 --------------------------------------- 2 files changed, 23 insertions(+), 57 deletions(-) (limited to 'keyboards/rubi') 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 } \ -} -- cgit v1.2.3 [cgit] Unable to lock slot /tmp/cgit/5a300000.lock: Permission denied (13)