Soft off

How do I add soft off and soft off waker combo to my config?
2 Replies
TyperAI
TyperAI2mo ago
Good question! To set up soft-off (putting the keyboard into a low-power "off" state) in ZMK, you’ll use the &soft_off behavior. You can also specify wake-up keys by combining it with a &soft_off waker behavior.
Here’s the breakdown: 1. Adding Soft Off Add a binding anywhere in your keymap:
&soft_off
&soft_off
Example:
bindings = <&kp ESC &soft_off>;
bindings = <&kp ESC &soft_off>;
That key would turn the keyboard off when pressed. --- 2. Adding Soft Off Waker To control which keys can wake the board up from soft off, use the soft-off waker combo. You create it just like other combos in ZMK:
/ {
combos {
soft_off_waker_combo {
timeout-ms = <50>;
key-positions = <0 1>; // update with the positions of the keys you want
bindings = <&soft_off_waker>;
};
};
};
/ {
combos {
soft_off_waker_combo {
timeout-ms = <50>;
key-positions = <0 1>; // update with the positions of the keys you want
bindings = <&soft_off_waker>;
};
};
};
- &soft_off_waker goes in a combo binding. - When that combo is defined, pressing those keys can wake up the keyboard from soft off. --- ⚡ Notes - If you don’t set any &soft_off_waker, then any key press will wake the keyboard.
- Defining one (or multiple) wakers restricts wake-up to those keys only.
- Great for preventing accidental wake-ups when traveling. --- For more detail, check ZMK’s docs on Key Behaviors.
Do you want me to give you an example specifically for the Corne/Lily58 default keymap positions so you can drop it right in?
Behavior Overview | ZMK Firmware
"Behaviors" are bindings that are assigned to and triggered by key positions on keymap layers, sensors (like an encoder) or combos. They describe what happens e.g. when a certain key position is pressed or released, or an encoder triggers a rotation event. They can also be recursively invoked by other behaviors, such as macros.
appleboblin
appleboblinOP2mo ago
🤔 seems very off

Did you find this page helpful?