Skip to content

Commit 57a1613

Browse files
author
te9no
committed
Refactor code structure and remove redundant code blocks for improved readability and maintainability
1 parent 5b27699 commit 57a1613

86 files changed

Lines changed: 804 additions & 1044 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

boards/shields/MKB/Kconfig.defconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if SHIELD_MKB_R_ENC || SHIELD_MKB_R_JOY || SHIELD_MKB_R_TB || SHIELD_MKB_R_RZT || SHIELD_MKB_R_TPD
1+
if SHIELD_MKB_R_ENC || SHIELD_MKB_R_JOY || SHIELD_MKB_R_TB || SHIELD_MKB_R_TBv3 || SHIELD_MKB_R_RZT || SHIELD_MKB_R_TPD || SHIELD_MKB_R_KEY
22
config ZMK_SPLIT
33
default y
44

@@ -26,9 +26,9 @@ if SHIELD_MKB_R_ENC || SHIELD_MKB_R_JOY || SHIELD_MKB_R_TB || SHIELD_MKB_R_RZT |
2626
endif # LVGL
2727
endif
2828

29-
if SHIELD_MKB_L_ENC || SHIELD_MKB_L_JOY || SHIELD_MKB_L_TB || SHIELD_MKB_L_RZT || SHIELD_MKB_L_TPD
29+
if SHIELD_MKB_L_Base || SHIELD_MKB_L_ENC || SHIELD_MKB_L_JOY || SHIELD_MKB_L_TB || SHIELD_MKB_L_RZT || SHIELD_MKB_L_TPD || SHIELD_MKB_L_KEY
3030
config ZMK_KEYBOARD_NAME
31-
default "MKB_L"
31+
default "MeKaBu"
3232

3333
config ZMK_SPLIT_ROLE_CENTRAL
3434
default y

boards/shields/MKB/Kconfig.shield

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
config SHIELD_MKB_R_Base
2+
def_bool $(shields_list_contains,MKB_R_Base)
13

24
config SHIELD_MKB_R_ENC
35
def_bool $(shields_list_contains,MKB_R_ENC)
@@ -7,10 +9,20 @@ config SHIELD_MKB_R_JOY
79

810
config SHIELD_MKB_R_TB
911
def_bool $(shields_list_contains,MKB_R_TB)
12+
13+
config SHIELD_MKB_R_TBv3
14+
def_bool $(shields_list_contains,MKB_R_TBv3)
1015

1116
config SHIELD_MKB_R_RZT
1217
def_bool $(shields_list_contains,MKB_R_RZT)
1318

19+
config SHIELD_MKB_R_KEY
20+
def_bool $(shields_list_contains,MKB_R_KEY)
21+
22+
23+
config SHIELD_MKB_L_Base
24+
def_bool $(shields_list_contains,MKB_L_Base)
25+
1426
config SHIELD_MKB_L_ENC
1527
def_bool $(shields_list_contains,MKB_L_ENC)
1628

@@ -24,4 +36,7 @@ config SHIELD_MKB_L_RZT
2436
def_bool $(shields_list_contains,MKB_L_RZT)
2537

2638
config SHIELD_MKB_L_TPD
27-
def_bool $(shields_list_contains,MKB_L_TPD)
39+
def_bool $(shields_list_contains,MKB_L_TPD)
40+
41+
config SHIELD_MKB_L_KEY
42+
def_bool $(shields_list_contains,MKB_L_KEY)

boards/shields/MKB/MKB.dtsi

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
RC( 0, 3) RC( 1, 3) RC( 2, 3) RC( 4, 3) RC( 5, 3) RC( 4, 1) RC( 0, 9) RC( 1, 9) RC( 2, 9) RC( 4, 9) RC( 5, 9) RC( 4, 7)
1919
RC( 0, 4) RC( 1, 4) RC( 2, 4) RC( 3, 4) RC( 5, 4) RC( 0,10) RC( 1,10) RC( 2,10) RC( 3,10) RC( 5,10)
2020
RC( 3, 5) RC( 2, 5) RC( 4, 5) RC( 1, 5) RC( 0, 5) RC( 2,11) RC( 0,11) RC( 4,11) RC( 3,11) RC( 1,11)
21+
RC( 6, 0) RC( 6, 6)
2122
>;
2223
};
2324

@@ -84,6 +85,8 @@
8485
, <&key_physical_attrs 50 50 925 375 0 0 0>
8586
, <&key_physical_attrs 50 50 925 425 0 0 0>
8687
, <&key_physical_attrs 50 50 975 375 0 0 0>
88+
, <&key_physical_attrs 100 100 335 300 0 0 0>
89+
, <&key_physical_attrs 100 100 1260 300 0 0 0>
8790
;
8891
};
8992

@@ -116,11 +119,14 @@
116119
};
117120
};
118121

119-
left_encoder: encoder_left {
122+
// Encoders
123+
left_encoder: left_encoder {
124+
compatible = "alps,ec11";
120125
status = "disabled";
121126
};
122127

123-
right_encoder: encoder_right {
128+
right_encoder: right_encoder {
129+
compatible = "alps,ec11";
124130
status = "disabled";
125131
};
126132

boards/shields/MKB/MKB.zmk.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
file_format: "1"
2-
id: MKB
3-
name: MKB
2+
id: MeKaBu
3+
name: MeKaBu
44
type: shield
55
url: https://github.com/Modulable-Keyboard-Developer/zmk-config-MKB
66
requires: [seeeduino_xiao_ble]

boards/shields/MKB/MKB_L_Base.conf

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Enable USB and Bluetooth connectivity
2+
CONFIG_ZMK_USB=y
3+
CONFIG_ZMK_BLE=y
4+
CONFIG_ZMK_MOUSE=y
5+
CONFIG_ZMK_POINTING=y
6+
7+
# Basic hardware configurations
8+
CONFIG_INPUT=y
9+
CONFIG_PINCTRL=y
10+
CONFIG_I2C=y
11+
CONFIG_I2C_NRFX=y
12+
CONFIG_NFCT_PINS_AS_GPIOS=y
13+
CONFIG_SENSOR=y
14+
15+
# Debug logging settings
16+
CONFIG_ZMK_USB_LOGGING=y
17+
CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
18+
19+
# Split keyboard configuration
20+
CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=1
21+
22+
# Display settings
23+
CONFIG_ZMK_DISPLAY=y
24+
# CONFIG_ZMK_WIDGET_WPM_STATUS=y
25+
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
26+
# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
27+
28+
# Rotary encoder configuration
29+
CONFIG_EC11=y
30+
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
31+
32+
# RGB LED widget configuration
33+
CONFIG_RGBLED_WIDGET=y
34+
CONFIG_RGBLED_WIDGET_INTERVAL_MS=250
35+
CONFIG_RGBLED_WIDGET_BATTERY_LEVEL_HIGH=50
36+
CONFIG_RGBLED_WIDGET_BATTERY_LEVEL_CRITICAL=10
37+
CONFIG_RGBLED_WIDGET_SHOW_LAYER_CHANGE=y
38+
CONFIG_RGBLED_WIDGET_LAYER_COLOR=7
39+
CONFIG_RGBLED_WIDGET_BATTERY_SHOW_PERIPHERALS=y
40+
41+
# Battery reporting configuration
42+
CONFIG_ZMK_BATTERY_REPORTING=y
43+
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXY=y
44+
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
45+
46+
# Thread stack size configurations
47+
CONFIG_ZMK_BLE_THREAD_STACK_SIZE=2048
48+
CONFIG_ZMK_LOW_PRIORITY_THREAD_STACK_SIZE=2048
49+
CONFIG_INPUT_THREAD_STACK_SIZE=2048
50+
CONFIG_ZMK_SPLIT_BLE_PERIPHERAL_STACK_SIZE=2048
51+
CONFIG_ZMK_SPLIT_BLE_CENTRAL_SPLIT_RUN_STACK_SIZE=3096
52+
53+
# Bluetooth PHY settings
54+
CONFIG_BT_CTLR_PHY_2M=n
55+
56+
# Bluetooth connection interval settings (in units of 1.25ms)
57+
CONFIG_BT_PERIPHERAL_PREF_MIN_INT=12
58+
CONFIG_BT_PERIPHERAL_PREF_MAX_INT=12
59+
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
60+
61+
# ZMK Studio configuration
62+
CONFIG_ZMK_STUDIO=y
63+
CONFIG_ZMK_STUDIO_LOCKING=n
64+
65+
# Key debouncing settings (in milliseconds)
66+
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=5
67+
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=7
68+
69+
# Enable Layout shift target for JIS keyboard
70+
CONFIG_LAYOUT_SHIFT_TARGET_JIS=y

0 commit comments

Comments
 (0)