zmk/app/dts/bindings/behaviors/zmk,behavior-custom-lock.yaml
Sophie Tyalie cac33f493a Behavior: Lock: Make persistence configurable
Persistence of a custom lock is disabled by default, but it can now
be enabled in the dts keyboard config similar to this:
```
deadlock: deadlock {
  compatible = "zmk,behavior-custom-lock";
  label = "dead-key-toggle";
  #binding-cells = <0>;

  persistence = "enabled";
}
```

Currently the options are `disabled`, `enabled` and `per-profile`, where
the latter doesn't do anything different to `enabled` as of right now.

Signed-off-by: Sophie Tyalie <dev@flowerpot.me>
2022-11-17 21:50:35 +01:00

28 lines
517 B
YAML

# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
description: Custom lock behavior variable definition
compatible: "zmk,behavior-custom-lock"
include: zero_param.yaml
properties:
persistence:
type: string
default: "disabled"
required: false
enum:
- "disabled"
- "enabled"
- "per-profile"
child-binding:
description: Key definitions for lock variable
include: two_param.yaml
properties:
bindings:
type: phandles
required: true