diff --git a/behaviors/combos.dtsi b/behaviors/combos.dtsi index 9b095c8..e9d8fd0 100644 --- a/behaviors/combos.dtsi +++ b/behaviors/combos.dtsi @@ -11,6 +11,8 @@ // NOTE: Other mouse keys related combos in ./mouse.dtsi +// NOTE: Soft off combos in ./soft-off.dtsi + /*********************** BASE LAYER ***********************/ diff --git a/behaviors/soft-off.dtsi b/behaviors/soft-off.dtsi new file mode 100644 index 0000000..a79abea --- /dev/null +++ b/behaviors/soft-off.dtsi @@ -0,0 +1,10 @@ +// NOTE: Only turn off it the key is held for N ms or longer +&soft_off { + hold-time-ms = <3000>; +}; + +// Soft off left half, active on navigation layer +ZMK_COMBO(off_left, &soft_off, LT3 LT4, NAV) + +// Soft off right half, active on symbols layer +ZMK_COMBO(off_right, &soft_off, RT3 RT4, SYM) diff --git a/config/corne.conf b/config/corne.conf index 587cf82..8099ff3 100644 --- a/config/corne.conf +++ b/config/corne.conf @@ -14,6 +14,10 @@ CONFIG_ZMK_SLEEP=y # 1.800.000 ms = 30 minutes CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000 +# enable soft off behavior +# https://zmk.dev/docs/config/power#soft-off +CONFIG_ZMK_PM_SOFT_OFF=y + # Add mouse keys support CONFIG_ZMK_MOUSE=y diff --git a/config/urchin.conf b/config/urchin.conf index 38afd6d..60043d8 100644 --- a/config/urchin.conf +++ b/config/urchin.conf @@ -12,6 +12,10 @@ CONFIG_ZMK_SLEEP=y # 1.800.000 ms = 30 minutes CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000 +# enable soft off behavior +# https://zmk.dev/docs/config/power#soft-off +CONFIG_ZMK_PM_SOFT_OFF=y + # "Eager Debouncing" # Trying to lower the input lag. # CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1