70055221767ff6b004006d3f349fcfdfcc864180
- Author
- Guido Bartolucci <guido@bartolucci.org>
- Committer
- GitHub <noreply@github.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/keyboards/madjax_macropad/keyboard.json b/keyboards/madjax_macropad/keyboard.json
2new file mode 100644
3index 0000000000000000000000000000000000000000..ac2802faef2d07d5783495756366f5f013854114
4--- /dev/null
5+++ b/keyboards/madjax_macropad/keyboard.json
6@@ -0,0 +1,55 @@
7+{
8+ "manufacturer": "MadJax",
9+ "keyboard_name": "madjax_macropad",
10+ "maintainer": "guidoism",
11+ "bootloader": "rp2040",
12+ "diode_direction": "COL2ROW",
13+ "features": {
14+ "bootmagic": true,
15+ "command": false,
16+ "console": false,
17+ "encoder": true,
18+ "extrakey": true,
19+ "mousekey": true,
20+ "nkro": true
21+ },
22+ "matrix_pins": {
23+ "cols": ["GP26", "GP27", "GP28", "GP29"],
24+ "rows": ["GP6", "GP7", "GP0", "GP4", "GP3"]
25+ },
26+ "encoder": {
27+ "rotary": [
28+ {"pin_a": "GP1", "pin_b": "GP2"}
29+ ]
30+ },
31+ "processor": "RP2040",
32+ "url": "https://github.com/guidoism/madjax_macropad",
33+ "usb": {
34+ "device_version": "1.0.0",
35+ "pid": "0x0000",
36+ "vid": "0xFEED"
37+ },
38+ "layouts": {
39+ "LAYOUT": {
40+ "layout": [
41+ {"matrix": [0, 3], "x": 3, "y": 0},
42+ {"matrix": [1, 0], "x": 0, "y": 1},
43+ {"matrix": [1, 1], "x": 1, "y": 1},
44+ {"matrix": [1, 2], "x": 2, "y": 1},
45+ {"matrix": [1, 3], "x": 3, "y": 1},
46+ {"matrix": [2, 0], "x": 0, "y": 2},
47+ {"matrix": [2, 1], "x": 1, "y": 2},
48+ {"matrix": [2, 2], "x": 2, "y": 2},
49+ {"matrix": [2, 3], "x": 3, "y": 2},
50+ {"matrix": [3, 0], "x": 0, "y": 3},
51+ {"matrix": [3, 1], "x": 1, "y": 3},
52+ {"matrix": [3, 2], "x": 2, "y": 3},
53+ {"matrix": [3, 3], "x": 3, "y": 3},
54+ {"matrix": [4, 0], "x": 0, "y": 4},
55+ {"matrix": [4, 1], "x": 1, "y": 4},
56+ {"matrix": [4, 2], "x": 2, "y": 4},
57+ {"matrix": [4, 3], "x": 3, "y": 4}
58+ ]
59+ }
60+ }
61+}
62diff --git a/keyboards/madjax_macropad/keymaps/default/keymap.c b/keyboards/madjax_macropad/keymaps/default/keymap.c
63new file mode 100644
64index 0000000000000000000000000000000000000000..693438c1f3e2056f11443d034ee8c81c05d96364
65--- /dev/null
66+++ b/keyboards/madjax_macropad/keymaps/default/keymap.c
67@@ -0,0 +1,49 @@
68+// Copyright 2023 QMK
69+// SPDX-License-Identifier: GPL-2.0-or-later
70+
71+#include QMK_KEYBOARD_H
72+
73+enum custom_keycodes {
74+ KC_P00 = SAFE_RANGE
75+};
76+
77+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
78+ /*
79+ * ┌───┐
80+ * │ - │
81+ * ┌───┬───┬───┼───┤
82+ * │ 7 │ 8 │ 9 │ + │
83+ * ├───┼───┼───┼───┤
84+ * │ 4 │ 5 │ 6 │ % │
85+ * ├───┼───┼───┼───┤
86+ * │ 1 │ 2 │ 3 │ = │
87+ * ├───┼───┼───┼───┤
88+ * │ 0 │00 │ . │Ent│
89+ * └───┴───┴───┴───┘
90+ */
91+ [0] = LAYOUT(
92+ KC_PMNS,
93+ KC_P7, KC_P8, KC_P9, KC_PPLS,
94+ KC_P4, KC_P5, KC_P6, KC_PERC,
95+ KC_P1, KC_P2, KC_P3, KC_EQL,
96+ KC_P0, KC_P00, KC_PDOT, KC_PENT
97+ )
98+};
99+
100+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
101+ if (record->event.pressed) {
102+ switch(keycode) {
103+ case KC_P00:
104+ tap_code(KC_P0);
105+ tap_code(KC_P0);
106+ return false;
107+ }
108+ }
109+ return true;
110+}
111+
112+#if defined(ENCODER_MAP_ENABLE)
113+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
114+ [0] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN) }
115+};
116+#endif
117diff --git a/keyboards/madjax_macropad/keymaps/default/rules.mk b/keyboards/madjax_macropad/keymaps/default/rules.mk
118new file mode 100644
119index 0000000000000000000000000000000000000000..ee325681483fbd804de1e14be33c47719c65bc71
120--- /dev/null
121+++ b/keyboards/madjax_macropad/keymaps/default/rules.mk
122@@ -0,0 +1 @@
123+ENCODER_MAP_ENABLE = yes
124diff --git a/keyboards/madjax_macropad/readme.md b/keyboards/madjax_macropad/readme.md
125new file mode 100644
126index 0000000000000000000000000000000000000000..1abe17ecca9f6ca716c69085fdab03cdb226f927
127--- /dev/null
128+++ b/keyboards/madjax_macropad/readme.md
129@@ -0,0 +1,24 @@
130+# MadJax Macropad
131+
132+* Keyboard Maintainer: [Guido Bartolucci](https://github.com/guidoism)
133+* Hardware Supported: Seeed Studio XIAO RP2040
134+* Hardware Availability: https://github.com/guidoism/madjax_macropad
135+
136+Make example for this keyboard (after setting up your build environment):
137+
138+ make madjax_macropad:default
139+
140+Flashing example for this keyboard:
141+
142+ make madjax_macropad:default:flash
143+