Skip to content

Commit 470a812

Browse files
committed
Merge remote-tracking branch 'origin/master' into develop
2 parents f533c61 + 99b8f3b commit 470a812

7 files changed

Lines changed: 222 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright 2026 ToYoNiX <toyonix.assemmohamed.2005@gmail.com>
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#pragma once
5+
6+
// Split configuration
7+
#define SPLIT_HAND_PIN_LOW_IS_LEFT
8+
9+
// Enable full duplex operation mode
10+
#define SERIAL_USART_FULL_DUPLEX
11+
#define SERIAL_USART_TX_PIN B6
12+
#define SERIAL_USART_RX_PIN B7
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Copyright 2024 zvecr <git@zvecr.com>
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#pragma once
5+
#define HAL_USE_SERIAL TRUE
6+
7+
#define SERIAL_USB_BUFFERS_SIZE 256
8+
9+
#include_next <halconf.h>
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
{
2+
"manufacturer": "Assem Mohamed",
3+
"keyboard_name": "handwired/tnx_corne_f401",
4+
"maintainer": "ToYoNiX",
5+
"development_board": "blackpill_f401",
6+
"bootloader": "tinyuf2",
7+
"diode_direction": "COL2ROW",
8+
"encoder": {
9+
"rotary": [
10+
{"pin_a": "B9", "pin_b": "B8", "resolution": 2}
11+
]
12+
},
13+
"split": {
14+
"enabled": true,
15+
"handedness": {
16+
"pin": "C13"
17+
},
18+
"serial": {
19+
"driver": "usart"
20+
},
21+
"transport": {
22+
"watchdog": true
23+
},
24+
"encoder": {
25+
"right": {
26+
"rotary": [
27+
{"pin_a": "B9", "pin_b": "B8", "resolution": 2}
28+
]
29+
}
30+
}
31+
},
32+
"features": {
33+
"bootmagic": true,
34+
"extrakey": true,
35+
"encoder": true,
36+
"mousekey": true,
37+
"nkro": true
38+
},
39+
"host": {
40+
"default": {
41+
"nkro": true
42+
}
43+
},
44+
"matrix_pins": {
45+
"cols": ["A8", "B15", "B14", "B13", "B12"],
46+
"rows": ["B0", "A5", "A4", "A3"]
47+
},
48+
"usb": {
49+
"device_version": "1.0.0",
50+
"pid": "0x544E",
51+
"vid": "0x4B42"
52+
},
53+
"layouts": {
54+
"LAYOUT_split_3x5_3": {
55+
"layout": [
56+
{"matrix": [0, 0], "x": 0, "y": 0.3},
57+
{"matrix": [0, 1], "x": 1, "y": 0.1},
58+
{"matrix": [0, 2], "x": 2, "y": 0},
59+
{"matrix": [0, 3], "x": 3, "y": 0.1},
60+
{"matrix": [0, 4], "x": 4, "y": 0.2},
61+
62+
{"matrix": [4, 4], "x": 8, "y": 0.2},
63+
{"matrix": [4, 3], "x": 9, "y": 0.1},
64+
{"matrix": [4, 2], "x": 10, "y": 0},
65+
{"matrix": [4, 1], "x": 11, "y": 0.1},
66+
{"matrix": [4, 0], "x": 12, "y": 0.3},
67+
68+
{"matrix": [1, 0], "x": 0, "y": 1.3},
69+
{"matrix": [1, 1], "x": 1, "y": 1.1},
70+
{"matrix": [1, 2], "x": 2, "y": 1},
71+
{"matrix": [1, 3], "x": 3, "y": 1.1},
72+
{"matrix": [1, 4], "x": 4, "y": 1.2},
73+
74+
{"matrix": [5, 4], "x": 8, "y": 1.2},
75+
{"matrix": [5, 3], "x": 9, "y": 1.1},
76+
{"matrix": [5, 2], "x": 10, "y": 1},
77+
{"matrix": [5, 1], "x": 11, "y": 1.1},
78+
{"matrix": [5, 0], "x": 12, "y": 1.3},
79+
80+
{"matrix": [2, 0], "x": 0, "y": 2.3},
81+
{"matrix": [2, 1], "x": 1, "y": 2.1},
82+
{"matrix": [2, 2], "x": 2, "y": 2},
83+
{"matrix": [2, 3], "x": 3, "y": 2.1},
84+
{"matrix": [2, 4], "x": 4, "y": 2.2},
85+
86+
{"matrix": [6, 4], "x": 8, "y": 2.2},
87+
{"matrix": [6, 3], "x": 9, "y": 2.1},
88+
{"matrix": [6, 2], "x": 10, "y": 2},
89+
{"matrix": [6, 1], "x": 11, "y": 2.1},
90+
{"matrix": [6, 0], "x": 12, "y": 2.3},
91+
92+
{"matrix": [3, 2], "x": 3, "y": 3.7},
93+
{"matrix": [3, 3], "x": 4, "y": 3.7},
94+
{"matrix": [3, 4], "x": 5, "y": 3.2, "h": 1.5},
95+
96+
{"matrix": [7, 4], "x": 7, "y": 3.2, "h": 1.5},
97+
{"matrix": [7, 3], "x": 8, "y": 3.7},
98+
{"matrix": [7, 2], "x": 9, "y": 3.7}
99+
]
100+
}
101+
}
102+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// Copyright 2026 ToYoNiX <toyonix.assemmohamed.2005@gmail.com>
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#include QMK_KEYBOARD_H
5+
6+
// Home Row Mods - custom modifier order
7+
#define HM_A LSFT_T(KC_A) // Shift
8+
#define HM_S LCTL_T(KC_S) // Ctrl
9+
#define HM_D LGUI_T(KC_D) // Win/GUI
10+
#define HM_F LALT_T(KC_F) // Alt
11+
12+
#define HM_J LALT_T(KC_J) // Alt
13+
#define HM_K LGUI_T(KC_K) // Win/GUI
14+
#define HM_L LCTL_T(KC_L) // Ctrl
15+
#define HM_SCLN RSFT_T(KC_SCLN) // Shift
16+
17+
// Keymap
18+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19+
/* BASE Layer: QWERTY */
20+
[0] = LAYOUT_split_3x5_3(
21+
//A8 B15 B14 B13 B12 B12 B13 B14 B15 A8
22+
KC_Q, KC_W, KC_E, KC_R, KC_T, /*B0*/ KC_Y, KC_U, KC_I, KC_O, KC_P,
23+
HM_A, HM_S, HM_D, HM_F, KC_G, /*A5*/ KC_H, HM_J, HM_K, HM_L, HM_SCLN,
24+
KC_Z, KC_X, KC_C, KC_V, KC_B, /*A4*/ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
25+
KC_ESC, KC_SPC, MO(1), /*A3*/ MO(2), KC_BSPC, KC_ENT
26+
),
27+
[1] = LAYOUT_split_3x5_3(
28+
KC_TAB, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_QUOT, KC_MINS, KC_EQL, KC_NO,
29+
KC_LSFT, KC_4, KC_5, KC_6, KC_PSCR, KC_HOME, KC_LBRC, KC_RBRC, KC_BSLS, KC_RSFT,
30+
KC_LGUI, KC_1, KC_2, KC_3, KC_DEL, KC_END, KC_COMM, KC_DOT, KC_SLSH, KC_NO,
31+
_______, _______, _______, _______, _______, _______
32+
),
33+
[2] = LAYOUT_split_3x5_3(
34+
QK_BOOT, KC_F7, KC_F8, KC_F9, KC_F10, TO(3), KC_NO, KC_NO, KC_NO, KC_NO,
35+
KC_NO, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
36+
QK_RBT, KC_F1, KC_F2, KC_F3, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
37+
_______, _______, _______, _______, _______, _______
38+
),
39+
// Gaming Layers
40+
[3] = LAYOUT_split_3x5_3(
41+
KC_TAB, KC_Q, KC_W, KC_E, KC_R, TO(0), KC_NO, KC_NO, KC_NO, KC_NO,
42+
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
43+
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
44+
KC_ESC, KC_SPC, LT(4, KC_LGUI), KC_NO, KC_NO, KC_NO
45+
),
46+
[4] = LAYOUT_split_3x5_3(
47+
KC_NO, KC_7, KC_8, KC_9, KC_0, TO(0), KC_NO, KC_NO, KC_NO, KC_NO,
48+
KC_M, KC_4, KC_5, KC_6, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
49+
KC_B, KC_1, KC_2, KC_3, KC_F3, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
50+
_______, _______, _______, KC_NO, KC_NO, KC_NO
51+
)
52+
};
53+
54+
// Encoders
55+
#if defined(ENCODER_MAP_ENABLE)
56+
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
57+
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(MS_WHLD, MS_WHLU) },
58+
[1] = { ENCODER_CCW_CW(KC_NO, KC_NO), ENCODER_CCW_CW(KC_BRIU, KC_BRID) },
59+
[2] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_NO, KC_NO) },
60+
[3] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_NO, KC_NO) },
61+
[4] = { ENCODER_CCW_CW(KC_NO, KC_NO), ENCODER_CCW_CW(KC_NO, KC_NO) },
62+
// Encoder 1 Encoder 2
63+
};
64+
#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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright 2024 zvecr <git@zvecr.com>
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
4+
#pragma once
5+
6+
#include_next <mcuconf.h>
7+
#undef STM32_SERIAL_USE_USART1
8+
#define STM32_SERIAL_USE_USART1 TRUE
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# handwired/tnx_corne_f401
2+
3+
![handwired/tnx_corne_f401](https://i.imgur.com/rHiwS60.jpeg)
4+
5+
*A handwired Corne keyboard using STM32 microcontrollers, with encoder support.*
6+
7+
* Keyboard Maintainer: [Assem Mohamed](https://github.com/ToYoNiX)
8+
* Hardware Supported: STM32F401, STM32F411, or STM32F103 development boards with USB HID support
9+
* Hardware Availability: Commonly available Blackpill F401 and Bluepill F103 boards, plus EC11 encoders and a TRRS cable
10+
11+
Make example for this keyboard (after setting up your build environment):
12+
13+
make handwired/tnx_corne_f401:default
14+
15+
Flashing example for this keyboard:
16+
17+
make handwired/tnx_corne_f401: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 2 ways:
24+
25+
* **Physical reset button**: Double-press the reset button on the dev board to enter DFU mode
26+
* **Keycode in layout**: Press the key mapped to `QK_BOOT`

0 commit comments

Comments
 (0)