fix(docs): Correct property types for behavior bindings

This commit is contained in:
Cem Aksoylar 2024-03-29 14:41:18 -07:00
parent 4bef4e98f5
commit e65a1227d8

View File

@ -58,9 +58,9 @@ Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml](htt
Applies to: `compatible = "zmk,behavior-hold-tap"`
| Property | Type | Description | Default |
| ----------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------- | ------------------ |
| ----------------------------- | -------- | -------------------------------------------------------------------------------------------------------------- | ------------------ |
| `#binding-cells` | int | Must be `<2>` | |
| `bindings` | phandle array | A list of two behaviors (without parameters): one for hold and one for tap | |
| `bindings` | phandles | A list of two behaviors (without parameters): one for hold and one for tap | |
| `flavor` | string | Adjusts how the behavior chooses between hold and tap | `"hold-preferred"` |
| `tapping-term-ms` | int | How long in milliseconds the key must be held to trigger a hold | |
| `quick-tap-ms` | int | Tap twice within this period (in milliseconds) to trigger a tap, even when held | -1 (disabled) |
@ -204,10 +204,10 @@ Definition files:
- [zmk/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-var.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/behaviors/zmk%2Cbehavior-sensor-rotate-var.yaml)
| Property | Type | Description | Default |
| ----------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| ----------------------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `compatible` | string | Sensor rotation type, **must be _one_ of**: <ul><li>`"zmk,behavior-sensor-rotate"`</li><li>`"zmk,behavior-sensor-rotate-var"`</li></ul> | |
| `#sensor-binding-cells` | int | Must be <ul><li>`<0>` if `compatible = "zmk,behavior-sensor-rotate"`</li><li>`<2>` if `compatible = "zmk,behavior-sensor-rotate-var"`</li></ul> | |
| `bindings` | phandle array | A list of two behaviors to trigger for each rotation direction, must include parameters for `"zmk,behavior-sensor-rotate"` and exclude them for `"zmk,behavior-sensor-rotate-var"` | |
| `bindings` | phandles for `"zmk,behavior-sensor-rotate"`, phandle array for `"zmk,behavior-sensor-rotate-var"` | A list of two behaviors to trigger for each rotation direction, must include parameters for `"zmk,behavior-sensor-rotate"` and exclude them for `"zmk,behavior-sensor-rotate-var"` | |
| `tap-ms` | int | The tap duration (between press and release events) in milliseconds for behaviors in `bindings` | 5 |
With `compatible = "zmk,behavior-sensor-rotate-var"`, this behavior forwards the first parameter it receives to the parameter of the first behavior specified in `bindings`, and second parameter to the parameter of the second behavior.
@ -225,9 +225,9 @@ Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-sticky-key.yaml](h
Applies to: `compatible = "zmk,behavior-sticky-key"`
| Property | Type | Description | Default |
| ------------------ | ------------- | ------------------------------------------------------------------------ | ------- |
| ------------------ | -------- | ------------------------------------------------------------------------ | ------- |
| `#binding-cells` | int | Must be `<1>` | |
| `bindings` | phandle array | A behavior (without parameters) to trigger | |
| `bindings` | phandles | A behavior (without parameters) to trigger | |
| `release-after-ms` | int | Releases the key after this many milliseconds if no other key is pressed | 1000 |
| `quick-release` | bool | Release the sticky key on the next key press instead of release | false |
| `lazy` | bool | Wait until the next key press to activate the sticky key behavior | false |