Skip to content

Commit

Permalink
Merge pull request #1 from qysp/feature/soft_off
Browse files Browse the repository at this point in the history
Add soft off behavior & define wakeup source
  • Loading branch information
qysp authored Jul 20, 2024
2 parents 65a5bf9 + 0fa961d commit fbfad92
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
10 changes: 8 additions & 2 deletions config/boards/shields/corne/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ config ZMK_KEYBOARD_NAME
config ZMK_SPLIT_ROLE_CENTRAL
default y

config ZMK_SPLIT
default y

endif

if SHIELD_CORNE_CENTRAL_DONGLE || SHIELD_CORNE_PERIPHERAL_LEFT || SHIELD_CORNE_PERIPHERAL_RIGHT
if SHIELD_CORNE_PERIPHERAL_LEFT || SHIELD_CORNE_PERIPHERAL_RIGHT

config ZMK_SPLIT
default y

endif
config ZMK_PM_SOFT_OFF
default y

endif
2 changes: 1 addition & 1 deletion config/boards/shields/corne/corne.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y

# Enable deep sleep (90 min)
CONFIG_ZMK_SLEEP=y
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=4500000
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=5400000

# Enable eager debouncing
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
Expand Down
12 changes: 8 additions & 4 deletions config/boards/shields/corne/corne.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
continue-list = <UNDERSCORE MINUS BSPC DEL N1 N2 N3 N4 N5 N6 N7 N8 N9 N0>;
};

&soft_off {
hold-time-ms = <3000>;
};

/ {
combos {
compatible = "zmk,combos";
Expand Down Expand Up @@ -83,10 +87,10 @@

layer_adjustment {
bindings = <
&none &none &kp C_VOL_DN &kp C_MUTE &kp C_VOL_UP &none &none &none &none &none &none &tog COLEMAK
&none &none &kp C_PREV &kp C_PP &kp C_NEXT &none &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none
&soft_off &none &kp C_VOL_DN &kp C_MUTE &kp C_VOL_UP &none &none &none &none &none &none &tog COLEMAK
&none &none &kp C_PREV &kp C_PP &kp C_NEXT &none &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none
>;
};
};
Expand Down
1 change: 1 addition & 0 deletions config/boards/shields/corne/corne_peripheral_left.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

&kscan0 {
compatible = "zmk,kscan-gpio-matrix";
wakeup-source;

col-gpios
= <&pro_micro 21 GPIO_ACTIVE_HIGH>
Expand Down
1 change: 1 addition & 0 deletions config/boards/shields/corne/corne_peripheral_right.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

&kscan0 {
compatible = "zmk,kscan-gpio-matrix";
wakeup-source;

col-gpios
= <&pro_micro 14 GPIO_ACTIVE_HIGH>
Expand Down

0 comments on commit fbfad92

Please sign in to comment.