From 4869b8061c187f6476f8f14b839dd2c2c9f74dd2 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 29 Mar 2023 15:54:34 +1100 Subject: Move ortho & numpad layouts to data driven (#20183) Co-authored-by: Nick Brassel --- keyboards/ckeys/obelus/info.json | 22 +++++++++++++++++++++- keyboards/ckeys/obelus/obelus.c | 2 +- keyboards/ckeys/obelus/obelus.h | 19 ------------------- 3 files changed, 22 insertions(+), 21 deletions(-) delete mode 100644 keyboards/ckeys/obelus/obelus.h (limited to 'keyboards/ckeys/obelus') diff --git a/keyboards/ckeys/obelus/info.json b/keyboards/ckeys/obelus/info.json index 33c7a23471..78ef0227c5 100644 --- a/keyboards/ckeys/obelus/info.json +++ b/keyboards/ckeys/obelus/info.json @@ -21,7 +21,27 @@ "community_layouts": ["ortho_4x4"], "layouts": { "LAYOUT_ortho_4x4": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}] + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3} + ] } } } diff --git a/keyboards/ckeys/obelus/obelus.c b/keyboards/ckeys/obelus/obelus.c index fc6b961f2a..123d93f0f4 100644 --- a/keyboards/ckeys/obelus/obelus.c +++ b/keyboards/ckeys/obelus/obelus.c @@ -1,4 +1,4 @@ -#include "obelus.h" +#include "quantum.h" void matrix_init_kb(void) { // put your keyboard start-up code here diff --git a/keyboards/ckeys/obelus/obelus.h b/keyboards/ckeys/obelus/obelus.h deleted file mode 100644 index 76ff4f1a9f..0000000000 --- a/keyboards/ckeys/obelus/obelus.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include "quantum.h" - -// This a shortcut to help you visually see your layout. -// The following is an example using the Planck MIT layout -// The first section contains all of the arguements -// The second converts the arguments into a two-dimensional array -#define LAYOUT_ortho_4x4( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, k23, \ - k30, k31, k32, k33 \ -) { \ - { k00, k01, k02, k03 }, \ - { k10, k11, k12, k13 }, \ - { k20, k21, k22, k23 }, \ - { k30, k31, k32, k33 } \ -} -- cgit v1.2.3