summaryrefslogtreecommitdiff
path: root/keyboards/handwired/arrow_pad
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-04-05 15:46:59 +1000
committerGitHub <noreply@github.com>2023-04-05 15:46:59 +1000
commit364c06d939134184838579d4e73880f8c2f83419 (patch)
treeb54be2d8a9a7ca5913774390bb0772e927d6523a /keyboards/handwired/arrow_pad
parent06c5c028046adc0a5501f6ac51953640e2015020 (diff)
Move small macropad-ish layouts to data driven (#20341)
Diffstat (limited to 'keyboards/handwired/arrow_pad')
-rw-r--r--keyboards/handwired/arrow_pad/arrow_pad.h35
-rw-r--r--keyboards/handwired/arrow_pad/info.json78
-rw-r--r--keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c13
3 files changed, 42 insertions, 84 deletions
diff --git a/keyboards/handwired/arrow_pad/arrow_pad.h b/keyboards/handwired/arrow_pad/arrow_pad.h
deleted file mode 100644
index 489dae2a4e..0000000000
--- a/keyboards/handwired/arrow_pad/arrow_pad.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#pragma once
-
-#include "quantum.h"
-
-#define XXX KC_NO
-
-// This is the 21-key keypad to 4x6 element matrix mapping
-#define LAYOUT( \
- k00, k01, k02, k03, \
- k10, k11, k12, k13, \
- k20, k21, k22, k23, \
- k30, k31, k32, k33, \
- k40, k41, k42, k43, \
- k50, k51, k52, k53 \
-) { \
- { k00, k01, k02, k03 }, \
- { k10, k11, k12, k13 }, \
- { k20, k21, k22, k23 }, \
- { k30, k31, k32, k33 }, \
- { k40, k41, k42, k43 }, \
- { k50, k51, k52, k53 } \
-}
-
-// This is the 21-key keypad to 2x11 element matrix mapping
-#define LAYOUT_pad21( \
- k00, k01, k02, k03, \
- k10, k11, k12, k13, \
- k04, k05, k06, \
- k14, k15, k16, k07, \
- k08, k09, k0A, \
- k19, k1A, k17 \
-) { \
- { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \
- { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19, k1A } \
-}
diff --git a/keyboards/handwired/arrow_pad/info.json b/keyboards/handwired/arrow_pad/info.json
index 91690cf83e..b9d705f3bf 100644
--- a/keyboards/handwired/arrow_pad/info.json
+++ b/keyboards/handwired/arrow_pad/info.json
@@ -21,55 +21,35 @@
"layouts": {
"LAYOUT": {
"layout": [
- {"label":"KM_ESC", "x":0, "y":0},
- {"label":"KM_TAB", "x":1, "y":0},
- {"label":"KM_BSL", "x":2, "y":0},
- {"label":"KM_ARR", "x":3, "y":0},
- {"label":"KM_NUM", "x":0, "y":1},
- {"label":"KM_FSL", "x":1, "y":1},
- {"label":"KM_AST", "x":2, "y":1},
- {"label":"KM_MIN", "x":3, "y":1},
- {"label":"KM___7", "x":0, "y":2},
- {"label":"KM___8", "x":1, "y":2},
- {"label":"KM___9", "x":2, "y":2},
- {"label":"KM_EQU", "x":3, "y":2},
- {"label":"KM___4", "x":0, "y":3},
- {"label":"KM___5", "x":1, "y":3},
- {"label":"KM___6", "x":2, "y":3},
- {"label":"KM_PLS", "x":3, "y":3},
- {"label":"KM___1", "x":0, "y":4},
- {"label":"KM___2", "x":1, "y":4},
- {"label":"KM___3", "x":2, "y":4},
- {"label":"___ENT", "x":3, "y":4},
- {"label":"KM___0", "x":0, "y":5},
- {"label":"_____0", "x":1, "y":5},
- {"label":"KM_DOT", "x":2, "y":5},
- {"label":"KM_ENT", "x":3, "y":5}
- ]
- },
- "LAYOUT_pad21": {
- "layout": [
- {"label":"KM_ESC", "x":0, "y":0},
- {"label":"KM_TAB", "x":1, "y":0},
- {"label":"KM_BSL", "x":2, "y":0},
- {"label":"KM_ARR", "x":3, "y":0},
- {"label":"KM_NUM", "x":0, "y":1},
- {"label":"KM_FSL", "x":1, "y":1},
- {"label":"KM_AST", "x":2, "y":1},
- {"label":"KM_MIN", "x":3, "y":1},
- {"label":"KM___7", "x":0, "y":2},
- {"label":"KM___8", "x":1, "y":2},
- {"label":"KM___9", "x":2, "y":2},
- {"label":"KM___4", "x":0, "y":3},
- {"label":"KM___5", "x":1, "y":3},
- {"label":"KM___6", "x":2, "y":3},
- {"label":"KM_PLS", "x":3, "y":2, "h":2},
- {"label":"KM___1", "x":0, "y":4},
- {"label":"KM___2", "x":1, "y":4},
- {"label":"KM___3", "x":2, "y":4},
- {"label":"KM___0", "x":0, "y":5, "w":2},
- {"label":"KM_DOT", "x":2, "y":5},
- {"label":"KM_ENT", "x":3, "y":4, "h":2}
+ {"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},
+
+ {"matrix": [4, 0], "x": 0, "y": 4},
+ {"matrix": [4, 1], "x": 1, "y": 4},
+ {"matrix": [4, 2], "x": 2, "y": 4},
+ {"matrix": [4, 3], "x": 3, "y": 4},
+
+ {"matrix": [5, 0], "x": 0, "y": 5},
+ {"matrix": [5, 1], "x": 1, "y": 5},
+ {"matrix": [5, 2], "x": 2, "y": 5},
+ {"matrix": [5, 3], "x": 3, "y": 5}
]
}
}
diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c b/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c
index bc940420fe..cf291c00cf 100644
--- a/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c
+++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c
@@ -2,6 +2,19 @@
#include QMK_KEYBOARD_H
#include "led.h"
+// This is the 21-key keypad to 2x11 element matrix mapping
+#define LAYOUT_pad21( \
+ k00, k01, k02, k03, \
+ k10, k11, k12, k13, \
+ k04, k05, k06, \
+ k14, k15, k16, k07, \
+ k08, k09, k0A, \
+ k19, k1A, k17 \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19, k1A } \
+}
+
enum layers {
LAYER_BASE,
LAYER_EDIT,