From 824dacb88c185435c20a9cca8cd4cf2468ab867c Mon Sep 17 00:00:00 2001 From: xopclabs Date: Thu, 5 Sep 2024 04:23:09 +0300 Subject: [PATCH] Added soft_off --- config/cradio.conf | 5 ++++- config/cradio.keymap | 4 ++-- config/features/behaviors.dtsi | 6 +++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/config/cradio.conf b/config/cradio.conf index aa3f26d..c586193 100644 --- a/config/cradio.conf +++ b/config/cradio.conf @@ -13,10 +13,13 @@ CONFIG_ZMK_SLEEP=y # 1.800.000 ms = 30 minutes CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000 +# software switch +CONFIG_ZMK_PM_SOFT_OFF=y + # "Eager Debouncing" # Trying to lower the input lag. CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5 -#CONFIG_ZMK_USB_LOGGING=y \ No newline at end of file +#CONFIG_ZMK_USB_LOGGING=y diff --git a/config/cradio.keymap b/config/cradio.keymap index f3e3673..0f43bc2 100644 --- a/config/cradio.keymap +++ b/config/cradio.keymap @@ -52,7 +52,7 @@ &none &none &none &none &none &none &none &none &none &none &kp N7 &kp N5 &kp N3 &kp N1 &kp N9 &kp N8 &kp N0 &kp N2 &kp N4 &kp N6 &none &none &none &none &none &none &none &out OUT_TOG &bt BT_SEL 0 &bt BT_CLR_ALL - &none &sl FUNC &none &none + &none &sl FUNC &none &soft_off >; }; @@ -62,7 +62,7 @@ &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &sk LGUI &sk LALT &sk LSHIFT &sk LCTRL &kp C_VOL_UP &kp PSCRN &kp LEFT &kp DOWN &kp UP &kp RIGHT &none &none &out OUT_TOG &kp DEL &kp C_VOL_DN &none &sl LANGCH &none &kp F11 &kp F12 - &none &none < NUM ESC &none + &soft_off &none < NUM ESC &none >; }; diff --git a/config/features/behaviors.dtsi b/config/features/behaviors.dtsi index ca8bebc..557aa18 100644 --- a/config/features/behaviors.dtsi +++ b/config/features/behaviors.dtsi @@ -18,6 +18,10 @@ quick-release; }; +&soft_off { + hold-time-ms = <3000>; +}; + / { behaviors { @@ -71,4 +75,4 @@ bindings = <&out OUT_TOG>, <&bt BT_SEL 0>; }; }; -}; \ No newline at end of file +};