forked from kofal.net/zmk
feat(behaviors): Add soft off behavior.
* New soft-off behavior that can be used to force the device into soft-off state with only certain configured wakeup devices.
This commit is contained in:
committed by
Pete Johanson
parent
738c3c0e3b
commit
b19df0cbf0
@@ -6,9 +6,8 @@
|
||||
|
||||
/ {
|
||||
behaviors {
|
||||
/omit-if-no-ref/ soft_off: behavior_soft_off {
|
||||
soft_off: soft_off {
|
||||
compatible = "zmk,behavior-soft-off";
|
||||
label = "SOFTOFF";
|
||||
#binding-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
14
app/dts/bindings/behaviors/zmk,behavior-soft-off.yaml
Normal file
14
app/dts/bindings/behaviors/zmk,behavior-soft-off.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
description: Soft-Off Behavior
|
||||
|
||||
compatible: "zmk,behavior-soft-off"
|
||||
|
||||
include: zero_param.yaml
|
||||
|
||||
properties:
|
||||
hold-time-ms:
|
||||
type: int
|
||||
required: false
|
||||
description: Number of milliseconds the behavior must be held before releasing will actually trigger a soft-off.
|
||||
Reference in New Issue
Block a user