Skip to content

Commit d35cdcc

Browse files
gkeyboardwaffle87
andauthored
[Keyboard] Add GPAD8-2R (gpad8_2r) Macro Pad (qmk#19914)
Co-authored-by: jack <[email protected]>
1 parent b85a9ab commit d35cdcc

File tree

8 files changed

+298
-0
lines changed

8 files changed

+298
-0
lines changed

keyboards/gkeyboard/gpad8_2r/config.h

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Copyright 2023 gkeyboard (@gkeyboard)
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#pragma once
5+
6+
#define DYNAMIC_KEYMAP_LAYER_COUNT 8
7+
8+
#define RGB_DI_PIN GP19
9+
#define RGB_MATRIX_LED_COUNT 16
10+
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
11+
#define RGB_MATRIX_KEYPRESSES
12+
#define RGB_DISABLE_WHEN_USB_SUSPENDED
13+
// RGB Matrix Animation modes. Explicitly enabled
14+
// For full list of effects, see:
15+
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
16+
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
17+
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
18+
#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
19+
#define ENABLE_RGB_MATRIX_BREATHING
20+
#define ENABLE_RGB_MATRIX_BAND_SAT
21+
#define ENABLE_RGB_MATRIX_BAND_VAL
22+
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
23+
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
24+
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
25+
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
26+
#define ENABLE_RGB_MATRIX_CYCLE_ALL
27+
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
28+
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
29+
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
30+
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
31+
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
32+
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
33+
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
34+
#define ENABLE_RGB_MATRIX_DUAL_BEACON
35+
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
36+
#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
37+
#define ENABLE_RGB_MATRIX_RAINDROPS
38+
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
39+
#define ENABLE_RGB_MATRIX_HUE_BREATHING
40+
#define ENABLE_RGB_MATRIX_HUE_PENDULUM
41+
#define ENABLE_RGB_MATRIX_HUE_WAVE
42+
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
43+
#define ENABLE_RGB_MATRIX_PIXEL_FLOW
44+
#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
45+
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
46+
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
47+
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
48+
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
49+
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
50+
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
51+
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
52+
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
53+
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
54+
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
55+
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
56+
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
57+
#define ENABLE_RGB_MATRIX_SPLASH
58+
#define ENABLE_RGB_MATRIX_MULTISPLASH
59+
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
60+
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
61+
62+
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
63+
#define LOCKING_SUPPORT_ENABLE
64+
/* Locking resynchronize hack */
65+
#define LOCKING_RESYNC_ENABLE
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"manufacturer": "gkeyboard",
3+
"keyboard_name": "GPAD8-2R",
4+
"url": "https://github.com/gkeyboard/GPAD8-2R",
5+
"maintainer": "gkeyboard",
6+
"bootloader": "rp2040",
7+
"processor": "RP2040",
8+
"board": "GENERIC_RP_RP2040",
9+
"usb": {
10+
"vid": "0x474B",
11+
"pid": "0x4202",
12+
"device_version": "1.0.0"
13+
},
14+
"features": {
15+
"bootmagic": true,
16+
"command": false,
17+
"console": false,
18+
"extrakey": true,
19+
"mousekey": true,
20+
"nkro": true,
21+
"rgb_matrix": true
22+
},
23+
"matrix_pins": {
24+
"cols": ["GP12", "GP11", "GP10", "GP9"],
25+
"rows": ["GP4", "GP5", "GP6"]
26+
},
27+
"diode_direction": "COL2ROW",
28+
"encoder": {
29+
"enabled": true,
30+
"rotary": [
31+
{
32+
"pin_a": "GP29",
33+
"pin_b": "GP28",
34+
"resolution": 4
35+
},
36+
{
37+
"pin_a": "GP2",
38+
"pin_b": "GP3",
39+
"resolution": 4
40+
}
41+
]
42+
},
43+
"rgb_matrix": {
44+
"driver": "WS2812",
45+
"layout": [
46+
{ "flags": 4, "matrix": [1, 0], "x": 28, "y": 12 },
47+
{ "flags": 4, "matrix": [1, 1], "x": 84, "y": 12 },
48+
{ "flags": 4, "matrix": [1, 2], "x": 140, "y": 12 },
49+
{ "flags": 4, "matrix": [1, 3], "x": 196, "y": 12 },
50+
{ "flags": 4, "matrix": [2, 0], "x": 28, "y": 28 },
51+
{ "flags": 4, "matrix": [2, 1], "x": 84, "y": 28 },
52+
{ "flags": 4, "matrix": [2, 2], "x": 140, "y": 28 },
53+
{ "flags": 4, "matrix": [2, 3], "x": 196, "y": 28 },
54+
{ "flags": 2, "x": 28, "y": 44 },
55+
{ "flags": 2, "x": 84, "y": 44 },
56+
{ "flags": 2, "x": 140, "y": 44 },
57+
{ "flags": 2, "x": 196, "y": 44 },
58+
{ "flags": 2, "x": 28, "y": 60 },
59+
{ "flags": 2, "x": 84, "y": 60 },
60+
{ "flags": 2, "x": 140, "y": 60 },
61+
{ "flags": 2, "x": 196, "y": 60 }
62+
]
63+
},
64+
"layouts": {
65+
"LAYOUT": {
66+
"layout": [
67+
{ "matrix": [0, 0], "x": 0.0, "y": 0.0 },
68+
{ "matrix": [0, 3], "x": 3.0, "y": 0.0 },
69+
{ "matrix": [1, 0], "x": 0.0, "y": 1.25 },
70+
{ "matrix": [1, 1], "x": 1.0, "y": 1.25 },
71+
{ "matrix": [1, 2], "x": 2.0, "y": 1.25 },
72+
{ "matrix": [1, 3], "x": 3.0, "y": 1.25 },
73+
{ "matrix": [2, 0], "x": 0.0, "y": 2.25 },
74+
{ "matrix": [2, 1], "x": 1.0, "y": 2.25 },
75+
{ "matrix": [2, 2], "x": 2.0, "y": 2.25 },
76+
{ "matrix": [2, 3], "x": 3.0, "y": 2.25 }
77+
]
78+
}
79+
}
80+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/* Copyright 2023 gkeyboard
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU General Public License as published by
5+
* the Free Software Foundation, either version 2 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
*
13+
* You should have received a copy of the GNU General Public License
14+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
*/
16+
#include QMK_KEYBOARD_H
17+
18+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19+
20+
[0] = LAYOUT(
21+
KC_MUTE, RGB_TOG,
22+
KC_A, KC_B, KC_C, KC_D,
23+
KC_E, KC_F, KC_G, KC_H
24+
),
25+
[1] = LAYOUT(
26+
KC_TRNS, KC_TRNS,
27+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
28+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
29+
),
30+
[2] = LAYOUT(
31+
KC_TRNS, KC_TRNS,
32+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
33+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
34+
),
35+
[3] = LAYOUT(
36+
KC_TRNS, KC_TRNS,
37+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
38+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
39+
)
40+
};
41+
42+
#if defined(ENCODER_MAP_ENABLE)
43+
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
44+
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(RGB_MOD, RGB_RMOD) },
45+
[1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
46+
[2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
47+
[3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }
48+
};
49+
#endif
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ENCODER_MAP_ENABLE = yes
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/* Copyright 2023 gkeyboard
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU General Public License as published by
5+
* the Free Software Foundation, either version 2 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
*
13+
* You should have received a copy of the GNU General Public License
14+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
*/
16+
#include QMK_KEYBOARD_H
17+
18+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19+
20+
[0] = LAYOUT(
21+
KC_MUTE, RGB_TOG,
22+
KC_A, KC_B, KC_C, KC_D,
23+
KC_E, KC_F, KC_G, KC_H
24+
),
25+
[1] = LAYOUT(
26+
KC_TRNS, KC_TRNS,
27+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
28+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
29+
),
30+
[2] = LAYOUT(
31+
KC_TRNS, KC_TRNS,
32+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
33+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
34+
),
35+
[3] = LAYOUT(
36+
KC_TRNS, KC_TRNS,
37+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
38+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
39+
),
40+
[4] = LAYOUT(
41+
KC_TRNS, KC_TRNS,
42+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
43+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
44+
),
45+
[5] = LAYOUT(
46+
KC_TRNS, KC_TRNS,
47+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
48+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
49+
),
50+
[6] = LAYOUT(
51+
KC_TRNS, KC_TRNS,
52+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
53+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
54+
),
55+
[7] = LAYOUT(
56+
KC_TRNS, KC_TRNS,
57+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
58+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
59+
)
60+
};
61+
62+
#if defined(ENCODER_MAP_ENABLE)
63+
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
64+
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(RGB_MOD, RGB_RMOD) },
65+
[1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
66+
[2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
67+
[3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
68+
[4] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
69+
[5] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
70+
[6] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
71+
[7] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }
72+
};
73+
#endif
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
VIA_ENABLE = yes
2+
ENCODER_MAP_ENABLE = yes
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# GPAD8-2R
2+
3+
![GPAD8-2R](https://i.imgur.com/jAaO7gYh.png)
4+
5+
8 Keys Custom Macro Pad, 2 Encoders, with USB Type-C, RGB underglow, RGB Per Key Lighting.
6+
7+
* Keyboard Maintainer: [gkeyboard](https://github.com/gkeyboard)
8+
* Hardware Supported: GPAD8-2R PCB
9+
* Hardware Availability: http://www.mltelectronic.com
10+
11+
Make example for this keyboard (after setting up your build environment):
12+
13+
make gkeyboard/gpad8_2r:default
14+
15+
Flashing example for this keyboard:
16+
17+
make gkeyboard/gpad8_2r:default:flash
18+
19+
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
20+
21+
## Bootloader
22+
23+
Enter the bootloader in 3 ways:
24+
25+
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
26+
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
27+
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available

keyboards/gkeyboard/gpad8_2r/rules.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
WS2812_DRIVER = vendor

0 commit comments

Comments
 (0)