Skip to content

Commit

Permalink
feat: add soft-off behavior and combos
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffDess committed Aug 13, 2024
1 parent c38a1d5 commit 72948b2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions behaviors/combos.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

// NOTE: Other mouse keys related combos in ./mouse.dtsi

// NOTE: Soft off combos in ./soft-off.dtsi

/***********************
BASE LAYER
***********************/
Expand Down
10 changes: 10 additions & 0 deletions behaviors/soft-off.dtsi
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 4 additions & 0 deletions config/corne.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions config/urchin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72948b2

Please sign in to comment.