Skip to content

Commit dbd9b0a

Browse files
yiancaryiancarzvecr
authored
NK65 Gen2 Keyboard (qmk#26334)
* Initial commit * Cleanup * Update keyboards/novelkeys/nk65_gen2/keymaps/default/keymap.c Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/novelkeys/nk65_gen2/config.h Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/novelkeys/nk65_gen2/mcuconf.h Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/novelkeys/nk65_gen2/readme.md Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/novelkeys/nk65_gen2/halconf.h Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/novelkeys/nk65_gen2/keymaps/default/keymap.c Co-authored-by: Joel Challis <git@zvecr.com> * Simplify RGB matrix color settings in keymap.c * Update keyboards/novelkeys/nk65_gen2/readme.md Co-authored-by: Joel Challis <git@zvecr.com> * Update keyboards/novelkeys/nk65_gen2/readme.md Co-authored-by: Joel Challis <git@zvecr.com> --------- Co-authored-by: yiancar <yiancar@gmail.com> Co-authored-by: Joel Challis <git@zvecr.com>
1 parent b8bf40e commit dbd9b0a

6 files changed

Lines changed: 322 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2026 Yiancar
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#pragma once
5+
6+
#define WS2812_PWM_DRIVER PWMD3
7+
#define WS2812_PWM_CHANNEL 3
8+
#define WS2812_PWM_PAL_MODE 1
9+
#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM3
10+
#define WS2812_PWM_DMA_CHANNEL 3
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright 2026 Yiancar
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#pragma once
5+
6+
#define HAL_USE_PWM TRUE
7+
8+
#include_next <halconf.h>
Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
{
2+
"keyboard_name": "NK65 Gen2",
3+
"manufacturer": "Yiancar-Designs",
4+
"url": "www.yiancar-designs.com",
5+
"maintainer": "Yiancar",
6+
"usb": {
7+
"vid": "0x8968",
8+
"pid": "0x4E56",
9+
"device_version": "0.0.1"
10+
},
11+
"features": {
12+
"bootmagic": true,
13+
"extrakey": true,
14+
"mousekey": true,
15+
"nkro": true,
16+
"rgb_matrix": true
17+
},
18+
"ws2812": {
19+
"pin": "B0",
20+
"driver": "pwm"
21+
},
22+
"rgb_matrix": {
23+
"animations": {
24+
"alphas_mods": true,
25+
"band_pinwheel_sat": true,
26+
"band_pinwheel_val": true,
27+
"band_sat": true,
28+
"band_spiral_sat": true,
29+
"band_spiral_val": true,
30+
"band_val": true,
31+
"breathing": true,
32+
"cycle_all": true,
33+
"cycle_left_right": true,
34+
"cycle_out_in": true,
35+
"cycle_out_in_dual": true,
36+
"cycle_pinwheel": true,
37+
"cycle_spiral": true,
38+
"cycle_up_down": true,
39+
"digital_rain": true,
40+
"dual_beacon": true,
41+
"gradient_left_right": true,
42+
"gradient_up_down": true,
43+
"hue_breathing": true,
44+
"hue_pendulum": true,
45+
"hue_wave": true,
46+
"jellybean_raindrops": true,
47+
"multisplash": true,
48+
"pixel_flow": true,
49+
"pixel_fractal": true,
50+
"pixel_rain": true,
51+
"rainbow_beacon": true,
52+
"rainbow_moving_chevron": true,
53+
"rainbow_pinwheels": true,
54+
"raindrops": true,
55+
"solid_multisplash": true,
56+
"solid_reactive": true,
57+
"solid_reactive_cross": true,
58+
"solid_reactive_multicross": true,
59+
"solid_reactive_multinexus": true,
60+
"solid_reactive_multiwide": true,
61+
"solid_reactive_nexus": true,
62+
"solid_reactive_simple": true,
63+
"solid_reactive_wide": true,
64+
"solid_splash": true,
65+
"splash": true,
66+
"typing_heatmap": true
67+
},
68+
"driver": "ws2812",
69+
"layout": [
70+
{"matrix": [0,14], "flags":1, "x":224, "y":0},
71+
{"matrix": [0,13], "flags":1, "x":202, "y":0},
72+
{"matrix": [0,12], "flags":4, "x":179, "y":0},
73+
{"matrix": [0,11], "flags":4, "x":164, "y":0},
74+
{"matrix": [0,10], "flags":4, "x":149, "y":0},
75+
{"matrix": [0,9], "flags":4, "x":134, "y":0},
76+
{"matrix": [0,8], "flags":4, "x":119, "y":0},
77+
{"matrix": [0,7], "flags":4, "x":105, "y":0},
78+
{"matrix": [0,6], "flags":4, "x":90, "y":0},
79+
{"matrix": [0,5], "flags":4, "x":75, "y":0},
80+
{"matrix": [0,4], "flags":4, "x":60, "y":0},
81+
{"matrix": [0,3], "flags":4, "x":45, "y":0},
82+
{"matrix": [0,2], "flags":4, "x":30, "y":0},
83+
{"matrix": [0,1], "flags":4, "x":15, "y":0},
84+
{"matrix": [0,0], "flags":1, "x":0, "y":0},
85+
{"matrix": [1,0], "flags":1, "x":4, "y":16},
86+
{"matrix": [1,1], "flags":4, "x":22, "y":16},
87+
{"matrix": [1,2], "flags":4, "x":37, "y":16},
88+
{"matrix": [1,3], "flags":4, "x":52, "y":16},
89+
{"matrix": [1,4], "flags":4, "x":67, "y":16},
90+
{"matrix": [1,5], "flags":4, "x":82, "y":16},
91+
{"matrix": [1,6], "flags":4, "x":97, "y":16},
92+
{"matrix": [1,7], "flags":4, "x":112, "y":16},
93+
{"matrix": [1,8], "flags":4, "x":127, "y":16},
94+
{"matrix": [1,9], "flags":4, "x":142, "y":16},
95+
{"matrix": [1,10], "flags":4, "x":157, "y":16},
96+
{"matrix": [1,11], "flags":4, "x":172, "y":16},
97+
{"matrix": [1,12], "flags":4, "x":187, "y":16},
98+
{"matrix": [2,12], "flags":4, "x":205, "y":16},
99+
{"matrix": [1,14], "flags":1, "x":224, "y":16},
100+
{"matrix": [2,14], "flags":1, "x":224, "y":32},
101+
{"matrix": [2,13], "flags":1, "x":200, "y":32},
102+
{"matrix": [2,11], "flags":4, "x":175, "y":32},
103+
{"matrix": [2,10], "flags":4, "x":161, "y":32},
104+
{"matrix": [2,9], "flags":4, "x":146, "y":32},
105+
{"matrix": [2,8], "flags":4, "x":131, "y":32},
106+
{"matrix": [2,7], "flags":4, "x":116, "y":32},
107+
{"matrix": [2,6], "flags":4, "x":101, "y":32},
108+
{"matrix": [2,5], "flags":4, "x":86, "y":32},
109+
{"matrix": [2,4], "flags":4, "x":71, "y":32},
110+
{"matrix": [2,3], "flags":4, "x":56, "y":32},
111+
{"matrix": [2,2], "flags":4, "x":41, "y":32},
112+
{"matrix": [2,1], "flags":4, "x":26, "y":32},
113+
{"matrix": [2,0], "flags":1, "x":11, "y":24},
114+
{"matrix": [3,0], "flags":1, "x":9, "y":48},
115+
{"matrix": [3,2], "flags":4, "x":34, "y":48},
116+
{"matrix": [3,3], "flags":4, "x":49, "y":48},
117+
{"matrix": [3,4], "flags":4, "x":63, "y":48},
118+
{"matrix": [3,5], "flags":4, "x":78, "y":48},
119+
{"matrix": [3,6], "flags":4, "x":93, "y":48},
120+
{"matrix": [3,7], "flags":4, "x":108, "y":48},
121+
{"matrix": [3,8], "flags":4, "x":123, "y":48},
122+
{"matrix": [3,9], "flags":4, "x":138, "y":48},
123+
{"matrix": [3,10], "flags":4, "x":153, "y":48},
124+
{"matrix": [3,11], "flags":4, "x":168, "y":48},
125+
{"matrix": [3,12], "flags":1, "x":189, "y":48},
126+
{"matrix": [3,13], "flags":1, "x":209, "y":48},
127+
{"matrix": [3,14], "flags":1, "x":224, "y":48},
128+
{"matrix": [4,14], "flags":1, "x":224, "y":64},
129+
{"matrix": [4,13], "flags":1, "x":209, "y":64},
130+
{"matrix": [4,12], "flags":1, "x":194, "y":64},
131+
{"matrix": [4,11], "flags":1, "x":168, "y":64},
132+
{"matrix": [4,6], "flags":4, "x":105, "y":64},
133+
{"matrix": [4,2], "flags":1, "x":41, "y":64},
134+
{"matrix": [4,1], "flags":1, "x":22, "y":64},
135+
{"matrix": [4,0], "flags":1, "x":4, "y":64},
136+
{"matrix": [4,0], "flags":8, "x":0, "y":0},
137+
{"matrix": [4,0], "flags":8, "x":0, "y":0}
138+
],
139+
"max_brightness": 130,
140+
"sleep": true
141+
},
142+
"matrix_pins": {
143+
"cols": ["B12", "B13", "B14", "B15", "A8", "A10", "A14", "A15", "B3", "B4", "B5", "B6", "B7", "B8", "B9"],
144+
"rows": ["B10", "B2", "B1", "A9", "A5"]
145+
},
146+
"diode_direction": "COL2ROW",
147+
"processor": "STM32F072",
148+
"bootloader": "stm32-dfu",
149+
"layout_aliases": {
150+
"LAYOUT": "LAYOUT_65_ansi_blocker_tsangan"
151+
},
152+
"layouts": {
153+
"LAYOUT_65_ansi_blocker_tsangan": {
154+
"layout": [
155+
{"matrix": [0, 0], "x": 0, "y": 0},
156+
{"matrix": [0, 1], "x": 1, "y": 0},
157+
{"matrix": [0, 2], "x": 2, "y": 0},
158+
{"matrix": [0, 3], "x": 3, "y": 0},
159+
{"matrix": [0, 4], "x": 4, "y": 0},
160+
{"matrix": [0, 5], "x": 5, "y": 0},
161+
{"matrix": [0, 6], "x": 6, "y": 0},
162+
{"matrix": [0, 7], "x": 7, "y": 0},
163+
{"matrix": [0, 8], "x": 8, "y": 0},
164+
{"matrix": [0, 9], "x": 9, "y": 0},
165+
{"matrix": [0, 10], "x": 10, "y": 0},
166+
{"matrix": [0, 11], "x": 11, "y": 0},
167+
{"matrix": [0, 12], "x": 12, "y": 0},
168+
{"matrix": [0, 13], "x": 13, "y": 0, "w": 2},
169+
{"matrix": [0, 14], "x": 15, "y": 0},
170+
171+
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
172+
{"matrix": [1, 1], "x": 1.5, "y": 1},
173+
{"matrix": [1, 2], "x": 2.5, "y": 1},
174+
{"matrix": [1, 3], "x": 3.5, "y": 1},
175+
{"matrix": [1, 4], "x": 4.5, "y": 1},
176+
{"matrix": [1, 5], "x": 5.5, "y": 1},
177+
{"matrix": [1, 6], "x": 6.5, "y": 1},
178+
{"matrix": [1, 7], "x": 7.5, "y": 1},
179+
{"matrix": [1, 8], "x": 8.5, "y": 1},
180+
{"matrix": [1, 9], "x": 9.5, "y": 1},
181+
{"matrix": [1, 10], "x": 10.5, "y": 1},
182+
{"matrix": [1, 11], "x": 11.5, "y": 1},
183+
{"matrix": [1, 12], "x": 12.5, "y": 1},
184+
{"matrix": [2, 12], "x": 13.5, "y": 1, "w": 1.5},
185+
{"matrix": [1, 14], "x": 15, "y": 1},
186+
187+
{"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
188+
{"matrix": [2, 1], "x": 1.75, "y": 2},
189+
{"matrix": [2, 2], "x": 2.75, "y": 2},
190+
{"matrix": [2, 3], "x": 3.75, "y": 2},
191+
{"matrix": [2, 4], "x": 4.75, "y": 2},
192+
{"matrix": [2, 5], "x": 5.75, "y": 2},
193+
{"matrix": [2, 6], "x": 6.75, "y": 2},
194+
{"matrix": [2, 7], "x": 7.75, "y": 2},
195+
{"matrix": [2, 8], "x": 8.75, "y": 2},
196+
{"matrix": [2, 9], "x": 9.75, "y": 2},
197+
{"matrix": [2, 10], "x": 10.75, "y": 2},
198+
{"matrix": [2, 11], "x": 11.75, "y": 2},
199+
{"matrix": [2, 13], "x": 12.75, "y": 2, "w": 2.25},
200+
{"matrix": [2, 14], "x": 15, "y": 2},
201+
202+
{"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
203+
{"matrix": [3, 2], "x": 2.25, "y": 3},
204+
{"matrix": [3, 3], "x": 3.25, "y": 3},
205+
{"matrix": [3, 4], "x": 4.25, "y": 3},
206+
{"matrix": [3, 5], "x": 5.25, "y": 3},
207+
{"matrix": [3, 6], "x": 6.25, "y": 3},
208+
{"matrix": [3, 7], "x": 7.25, "y": 3},
209+
{"matrix": [3, 8], "x": 8.25, "y": 3},
210+
{"matrix": [3, 9], "x": 9.25, "y": 3},
211+
{"matrix": [3, 10], "x": 10.25, "y": 3},
212+
{"matrix": [3, 11], "x": 11.25, "y": 3},
213+
{"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
214+
{"matrix": [3, 13], "x": 14, "y": 3},
215+
{"matrix": [3, 14], "x": 15, "y": 3},
216+
217+
{"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5},
218+
{"matrix": [4, 1], "x": 1.5, "y": 4, "w": 1},
219+
{"matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5},
220+
{"matrix": [4, 6], "x": 4, "y": 4, "w": 7},
221+
{"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
222+
{"matrix": [4, 12], "x": 13, "y": 4},
223+
{"matrix": [4, 13], "x": 14, "y": 4},
224+
{"matrix": [4, 14], "x": 15, "y": 4}
225+
]
226+
}
227+
}
228+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Copyright 2026 Yiancar
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
#include QMK_KEYBOARD_H
4+
5+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
6+
[0] = LAYOUT_65_ansi_blocker_tsangan( /* Base */
7+
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
8+
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
9+
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
10+
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
11+
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
12+
13+
[1] = LAYOUT_65_ansi_blocker_tsangan( /* FN */
14+
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS,
15+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT, KC_TRNS,
16+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
17+
KC_TRNS, RM_TOGG, RM_NEXT, RM_HUED, RM_HUEU, RM_SATD, RM_SATU, RM_VALD, RM_VALU, RM_SPDD, RM_SPDU, KC_TRNS, KC_TRNS, KC_TRNS,
18+
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
19+
};
20+
21+
bool rgb_matrix_indicators_user(void) {
22+
if (host_keyboard_led_state().caps_lock) {
23+
rgb_matrix_set_color(66, 5, 2, 1);
24+
} else {
25+
rgb_matrix_set_color(66, 0, 0, 0);
26+
}
27+
28+
if (get_highest_layer(layer_state|default_layer_state) == 1) {
29+
rgb_matrix_set_color(67, 3, 1, 5);
30+
} else {
31+
rgb_matrix_set_color(67, 0, 0, 0);
32+
}
33+
34+
return false;
35+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Copyright 2026 Yiancar
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#pragma once
5+
6+
#include_next <mcuconf.h>
7+
8+
#undef STM32_PWM_USE_TIM3
9+
#define STM32_PWM_USE_TIM3 TRUE
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# NK66 Gen2
2+
3+
This is a tsangan fixed layout 65% PCB. It supports full per-key RGB.
4+
5+
* Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [GitHub](https://github.com/yiancar)
6+
* Hardware Supported: A 65% keyboard with STM32F072CB
7+
* Hardware Availability: https://novelkeys.com/
8+
9+
Make example for this keyboard (after setting up your build environment):
10+
11+
make novelkeys/nk65_gen2:default
12+
13+
Flashing example for this keyboard:
14+
15+
make novelkeys/nk65_gen2:default:flash
16+
17+
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).
18+
19+
### Reset
20+
21+
- Unplug
22+
- Hold Escape
23+
- Plug In
24+
- Unplug
25+
- Release Escape
26+
27+
### Flash
28+
29+
- Unplug
30+
- Hold Escape
31+
- Plug In
32+
- Flash using QMK Toolbox or CLI (`make novelkeys/nk65_gen2:<keymap>:flash`)

0 commit comments

Comments
 (0)