Skip to content

Commit ccc6c6c

Browse files
authored
[Keyboard] Added Nifty Numpad (#23019)
* Initial commit of Nifty Numpad keyboard * Initial commit of Nifty Numpad keyboard * Fixed double repo * Updated available effects * Added a default and VIA keymap, moved cadence to its own keymap * Fixed qmk_firmware submodule issue * Updated Nifty Numpad readme Updated Cadence keymap Updated vscode settings to match QMK master * Added Nifty Numpad * Added config.h to idle_rgb_example * renamed info.json, removed rules.mk * Updated to conform with most recent PR checklist - Removed VIA keymap - Formatted keyboard.json with qmk format-json - Updated custom keycodes in nifty_numpad.h to start at QK_USER * Address review feedback - Remove the config.h file from the idle_rgb_example keymap as the only settings was equal to the default - Added empty endline to the end of idle_rgb_example/rules.mk and post_rules.mk - Updated RGB_DEF custom keycode to QK_KB * Removed commented layout visuals * Updated RGB Matrix keycodes * Updated use of eeconfig_update_kb_datablock to new signature
1 parent c93ef27 commit ccc6c6c

9 files changed

Lines changed: 597 additions & 0 deletions

File tree

keyboards/nifty_numpad/config.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Copyright 2023 Isaac Rex (@Acliad)
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#pragma once
5+
6+
#define EECONFIG_KB_DATA_SIZE 10
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
{
2+
"manufacturer": "Isaac Rex",
3+
"keyboard_name": "Nifty Numpad",
4+
"maintainer": "Acliad",
5+
"bootloader": "rp2040",
6+
"diode_direction": "ROW2COL",
7+
"features": {
8+
"bootmagic": true,
9+
"command": false,
10+
"console": false,
11+
"extrakey": true,
12+
"mousekey": true,
13+
"nkro": true,
14+
"rgb_matrix": true
15+
},
16+
"matrix_pins": {
17+
"cols": ["GP17", "GP18", "GP15", "GP13", "GP14", "GP12"],
18+
"rows": ["GP20", "GP21", "GP22", "GP23", "GP24", "GP25"]
19+
},
20+
"processor": "RP2040",
21+
"rgb_matrix": {
22+
"animations": {
23+
"band_pinwheel_sat": true,
24+
"band_pinwheel_val": true,
25+
"band_sat": true,
26+
"band_spiral_sat": true,
27+
"band_spiral_val": true,
28+
"band_val": true,
29+
"breathing": true,
30+
"cycle_all": true,
31+
"cycle_left_right": true,
32+
"cycle_out_in": true,
33+
"cycle_out_in_dual": true,
34+
"cycle_pinwheel": true,
35+
"cycle_spiral": true,
36+
"cycle_up_down": true,
37+
"digital_rain": true,
38+
"dual_beacon": true,
39+
"gradient_up_down": true,
40+
"jellybean_raindrops": true,
41+
"multisplash": true,
42+
"rainbow_beacon": true,
43+
"rainbow_moving_chevron": true,
44+
"rainbow_pinwheels": true,
45+
"raindrops": true,
46+
"solid_multisplash": true,
47+
"solid_reactive": true,
48+
"solid_reactive_cross": true,
49+
"solid_reactive_multicross": true,
50+
"solid_reactive_multinexus": true,
51+
"solid_reactive_multiwide": true,
52+
"solid_reactive_nexus": true,
53+
"solid_reactive_simple": true,
54+
"solid_reactive_wide": true,
55+
"solid_splash": true,
56+
"splash": true,
57+
"typing_heatmap": false
58+
},
59+
"default": {
60+
"animation": "solid_color",
61+
"hue": 127,
62+
"speed": 100
63+
},
64+
"driver": "ws2812",
65+
"layout": [
66+
{"matrix": [0, 0], "x": 0, "y": 0, "flags": 4},
67+
{"matrix": [0, 1], "x": 43, "y": 0, "flags": 4},
68+
{"matrix": [0, 2], "x": 96, "y": 0, "flags": 4},
69+
{"matrix": [0, 3], "x": 139, "y": 0, "flags": 4},
70+
{"matrix": [0, 4], "x": 181, "y": 0, "flags": 4},
71+
{"matrix": [0, 5], "x": 224, "y": 0, "flags": 4},
72+
{"matrix": [1, 0], "x": 0, "y": 17, "flags": 4},
73+
{"matrix": [1, 1], "x": 43, "y": 17, "flags": 4},
74+
{"matrix": [1, 2], "x": 96, "y": 17, "flags": 4},
75+
{"matrix": [1, 3], "x": 139, "y": 17, "flags": 4},
76+
{"matrix": [1, 4], "x": 181, "y": 17, "flags": 4},
77+
{"matrix": [1, 5], "x": 224, "y": 17, "flags": 4},
78+
{"matrix": [2, 0], "x": 0, "y": 29, "flags": 4},
79+
{"matrix": [2, 1], "x": 43, "y": 29, "flags": 4},
80+
{"matrix": [2, 2], "x": 96, "y": 29, "flags": 4},
81+
{"matrix": [2, 3], "x": 139, "y": 29, "flags": 4},
82+
{"matrix": [2, 4], "x": 181, "y": 29, "flags": 4},
83+
{"matrix": [2, 5], "x": 224, "y": 35, "flags": 4},
84+
{"matrix": [3, 0], "x": 0, "y": 41, "flags": 4},
85+
{"matrix": [3, 1], "x": 43, "y": 41, "flags": 4},
86+
{"matrix": [3, 2], "x": 96, "y": 41, "flags": 4},
87+
{"matrix": [3, 3], "x": 139, "y": 41, "flags": 4},
88+
{"matrix": [3, 4], "x": 181, "y": 41, "flags": 4},
89+
{"matrix": [4, 0], "x": 0, "y": 52, "flags": 4},
90+
{"matrix": [4, 1], "x": 43, "y": 52, "flags": 4},
91+
{"matrix": [4, 2], "x": 96, "y": 52, "flags": 4},
92+
{"matrix": [4, 3], "x": 139, "y": 52, "flags": 4},
93+
{"matrix": [4, 4], "x": 181, "y": 52, "flags": 4},
94+
{"matrix": [4, 5], "x": 224, "y": 58, "flags": 4},
95+
{"matrix": [5, 0], "x": 0, "y": 64, "flags": 4},
96+
{"matrix": [5, 1], "x": 43, "y": 64, "flags": 4},
97+
{"matrix": [5, 2], "x": 117, "y": 64, "flags": 4},
98+
{"matrix": [5, 3], "x": 181, "y": 64, "flags": 4}
99+
]
100+
},
101+
"url": "https://gitlab.com/Acliad/nifty-numpad",
102+
"usb": {
103+
"device_version": "1.0.0",
104+
"pid": "0x0000",
105+
"vid": "0x4E4E"
106+
},
107+
"ws2812": {
108+
"driver": "vendor",
109+
"pin": "GP19"
110+
},
111+
"layouts": {
112+
"LAYOUT_numpad_6x6": {
113+
"layout": [
114+
{"label": "F13", "matrix": [0, 0], "x": 0, "y": 0},
115+
{"label": "F19", "matrix": [0, 1], "x": 1, "y": 0},
116+
{"label": "BACKSPACE", "matrix": [0, 2], "x": 2.25, "y": 0},
117+
{"label": "TASK VIEW", "matrix": [0, 3], "x": 3.25, "y": 0},
118+
{"label": "EXPLORER", "matrix": [0, 4], "x": 4.25, "y": 0},
119+
{"label": "SCREENSHOT", "matrix": [0, 5], "x": 5.25, "y": 0},
120+
{"label": "F14", "matrix": [1, 0], "x": 0, "y": 1.5},
121+
{"label": "F20", "matrix": [1, 1], "x": 1, "y": 1.5},
122+
{"label": "NUM LOCK", "matrix": [1, 2], "x": 2.25, "y": 1.5},
123+
{"label": "/", "matrix": [1, 3], "x": 3.25, "y": 1.5},
124+
{"label": "*", "matrix": [1, 4], "x": 4.25, "y": 1.5},
125+
{"label": "-", "matrix": [1, 5], "x": 5.25, "y": 1.5},
126+
{"label": "F15", "matrix": [2, 0], "x": 0, "y": 2.5},
127+
{"label": "F21", "matrix": [2, 1], "x": 1, "y": 2.5},
128+
{"label": "7", "matrix": [2, 2], "x": 2.25, "y": 2.5},
129+
{"label": "8", "matrix": [2, 3], "x": 3.25, "y": 2.5},
130+
{"label": "9", "matrix": [2, 4], "x": 4.25, "y": 2.5},
131+
{"label": "+", "matrix": [2, 5], "x": 5.25, "y": 2.5, "h": 2},
132+
{"label": "F16", "matrix": [3, 0], "x": 0, "y": 3.5},
133+
{"label": "F22", "matrix": [3, 1], "x": 1, "y": 3.5},
134+
{"label": "4", "matrix": [3, 2], "x": 2.25, "y": 3.5},
135+
{"label": "5", "matrix": [3, 3], "x": 3.25, "y": 3.5},
136+
{"label": "6", "matrix": [3, 4], "x": 4.25, "y": 3.5},
137+
{"label": "F17", "matrix": [4, 0], "x": 0, "y": 4.5},
138+
{"label": "F23", "matrix": [4, 1], "x": 1, "y": 4.5},
139+
{"label": "1", "matrix": [4, 2], "x": 2.25, "y": 4.5},
140+
{"label": "2", "matrix": [4, 3], "x": 3.25, "y": 4.5},
141+
{"label": "3", "matrix": [4, 4], "x": 4.25, "y": 4.5},
142+
{"label": "ENTER", "matrix": [4, 5], "x": 5.25, "y": 4.5, "h": 2},
143+
{"label": "F18", "matrix": [5, 0], "x": 0, "y": 5.5},
144+
{"label": "F24", "matrix": [5, 1], "x": 1, "y": 5.5},
145+
{"label": "0", "matrix": [5, 2], "x": 2.25, "y": 5.5, "w": 2},
146+
{"label": ".", "matrix": [5, 4], "x": 4.25, "y": 5.5}
147+
]
148+
}
149+
}
150+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright 2023 Isaac Rex (@Acliad)
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#include QMK_KEYBOARD_H
5+
6+
// Layers
7+
// NOTE: LAYER_RGB is defined in nifty_numpad.h
8+
enum LAYERS {
9+
LAYER_BL,
10+
};
11+
12+
// Setup keymap
13+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
14+
[LAYER_BL] = LAYOUT_numpad_6x6(
15+
KC_F13, KC_F19, LT(LAYER_RGB, KC_BSPC), RGUI(KC_TAB), RGUI(KC_E), RGUI(RSFT(KC_S)),
16+
KC_F14, KC_F20, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
17+
KC_F15, KC_F21, KC_P7, KC_P8, KC_P9, KC_PPLS,
18+
KC_F16, KC_F22, KC_P4, KC_P5, KC_P6,
19+
KC_F17, KC_F23, KC_P1, KC_P2, KC_P3, KC_PENT,
20+
KC_F18, KC_F24, KC_P0, KC_PDOT
21+
),
22+
23+
[LAYER_RGB] = LAYOUT_numpad_6x6(
24+
_______, _______, _______, RM_HUEU, RM_SATU, RM_VALU,
25+
_______, _______, _______, RM_HUED, RM_SATD, RM_VALD,
26+
_______, _______, _______, RM_NEXT, _______, RM_SPDU,
27+
_______, _______, _______, _______, _______,
28+
_______, _______, _______, _______, _______, RM_SPDD,
29+
_______, _______, _______, _______
30+
)
31+
};
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
// Copyright 2023 Isaac Rex (@Acliad)
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#include QMK_KEYBOARD_H
5+
6+
// Layers
7+
// NOTE: LAYER_RGB is defined in nifty_numpad.h
8+
enum LAYERS {
9+
LAYER_BL = 0,
10+
LAYER_MOD,
11+
};
12+
13+
// Layer Indicator LED index
14+
#define _NUM_LED_INDEX 8
15+
16+
// Tap Dance Declarations
17+
enum {
18+
TD_NUM_TOGGLE = 0,
19+
TD_EDIT_GEN_TOGGLE,
20+
TD_M1,
21+
TD_M2,
22+
TD_M3,
23+
TD_M4,
24+
TD_M5,
25+
TD_M6,
26+
TD_M7,
27+
TD_M8,
28+
TD_M9,
29+
TD_M10,
30+
TD_M11,
31+
TD_M12,
32+
};
33+
34+
// TD function for 1 tap, toggle layer; 2 taps, press numlock
35+
void tap_dance_num_toggle(tap_dance_state_t *state, void *user_data){
36+
switch(state->count){
37+
case 1:
38+
layer_invert(LAYER_MOD);
39+
break;
40+
case 2:
41+
tap_code16(KC_NUM);
42+
break;
43+
}
44+
}
45+
46+
// Tap Dance Definitions
47+
tap_dance_action_t tap_dance_actions[] = {
48+
[TD_NUM_TOGGLE] = ACTION_TAP_DANCE_FN(tap_dance_num_toggle),
49+
50+
[TD_M1] = ACTION_TAP_DANCE_DOUBLE(KC_F13, LCTL(KC_F13)),
51+
[TD_M2] = ACTION_TAP_DANCE_DOUBLE(KC_F14, LCTL(KC_F14)),
52+
[TD_M3] = ACTION_TAP_DANCE_DOUBLE(KC_F15, LCTL(KC_F15)),
53+
[TD_M4] = ACTION_TAP_DANCE_DOUBLE(KC_F16, LCTL(KC_F16)),
54+
[TD_M5] = ACTION_TAP_DANCE_DOUBLE(KC_F17, LCTL(KC_F17)),
55+
[TD_M6] = ACTION_TAP_DANCE_DOUBLE(KC_F18, LCTL(KC_F18)),
56+
[TD_M7] = ACTION_TAP_DANCE_DOUBLE(KC_F19, LCTL(KC_F19)),
57+
[TD_M8] = ACTION_TAP_DANCE_DOUBLE(KC_F20, LCTL(KC_F20)),
58+
[TD_M9] = ACTION_TAP_DANCE_DOUBLE(KC_F21, LCTL(KC_F21)),
59+
[TD_M10] = ACTION_TAP_DANCE_DOUBLE(KC_F22, LCTL(KC_F22)),
60+
[TD_M11] = ACTION_TAP_DANCE_DOUBLE(KC_F23, LCTL(KC_F23)),
61+
[TD_M12] = ACTION_TAP_DANCE_DOUBLE(KC_F24, LCTL(KC_F24))
62+
};
63+
64+
// Setup keymap
65+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
66+
[LAYER_BL] = LAYOUT_numpad_6x6(
67+
TD(TD_M1), TD(TD_M7) , LT(LAYER_RGB, KC_BSPC), RGUI(KC_TAB), RGUI(KC_E), RGUI(RSFT(KC_S)),
68+
TD(TD_M2), TD(TD_M8) , TD(TD_NUM_TOGGLE), KC_PSLS, KC_PAST, KC_PMNS,
69+
TD(TD_M3), TD(TD_M9) , KC_P7, KC_P8, KC_P9, KC_PPLS,
70+
TD(TD_M4), TD(TD_M10), KC_P4, KC_P5, KC_P6,
71+
TD(TD_M5), TD(TD_M11), KC_P1, KC_P2, KC_P3, KC_PENT,
72+
TD(TD_M6), TD(TD_M12), KC_P0, KC_PDOT
73+
),
74+
75+
[LAYER_MOD] = LAYOUT_numpad_6x6(
76+
_______, _______, KC_F9, KC_F10, KC_F11, KC_F12,
77+
_______, _______, TD(TD_NUM_TOGGLE), RCTL(KC_PSLS), RCTL(KC_PAST), _______,
78+
_______, _______, RCTL(KC_P7), RCTL(KC_P8), RCTL(KC_P9), _______,
79+
_______, _______, RCTL(KC_P4), RCTL(KC_P5), RCTL(KC_P6),
80+
_______, _______, RCTL(KC_P1), RCTL(KC_P2), RCTL(KC_P3), _______,
81+
_______, _______, RCTL(KC_P0), RCTL(KC_PDOT)
82+
),
83+
84+
[LAYER_RGB] = LAYOUT_numpad_6x6(
85+
_______, _______, _______, RM_HUEU, RM_SATU, RM_VALU,
86+
_______, _______, _______, RM_HUED, RM_SATD, RM_VALD,
87+
_______, _______, _______, RM_DMOD, RM_IMOD, RM_SPDU,
88+
_______, _______, _______, _______, _______,
89+
_______, _______, _______, _______, _______, RM_SPDD,
90+
_______, _______, _______, _______
91+
)
92+
};
93+
94+
// Set the layer toggle key to an indication of the active layer. This is a
95+
// bit janky and should be done better, but I'm trying to avoid scope creep.
96+
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
97+
if (layer_state_is(LAYER_MOD) && !rgb_matrix_idle_mode()) {
98+
// Get a hue that contrasts with current hue
99+
uint8_t hue = rgb_matrix_get_hue() + 127;
100+
// Make sure saturation is high enough to distiguish between hues
101+
uint8_t sat = 255;
102+
uint8_t val = MIN((uint16_t) rgb_matrix_get_val() + 50, 255);
103+
RGB rgb = hsv_to_rgb((HSV) {hue, sat, val});
104+
rgb_matrix_set_color(_NUM_LED_INDEX, rgb.r, rgb.g, rgb.b);
105+
}
106+
return false;
107+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
TAP_DANCE_ENABLE=yes
2+
RGB_IDLE_ENABLE=yes

0 commit comments

Comments
 (0)