docs: Remove label property from documentation

This commit is contained in:
Joel Spadin
2023-10-06 20:49:58 -05:00
parent d4e8dee444
commit 5ecd3521f5
24 changed files with 51 additions and 83 deletions

View File

@@ -59,9 +59,8 @@ If you want to use multiple caps breaks with different codes to break the caps,
```dts
/ {
prog_caps: behavior_prog_caps_word {
prog_caps: prog_caps {
compatible = "zmk,behavior-caps-word";
label = "PROG_CAPS";
#binding-cells = <0>;
continue-list = <UNDERSCORE>;
};

View File

@@ -58,7 +58,6 @@ For example, the following hold-tap configuration enables `require-prior-idle-ms
```dts
rpi: require_prior_idle {
compatible = "zmk,behavior-hold-tap";
label = "REQUIRE_PRIOR_IDLE";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <200>;
@@ -104,7 +103,6 @@ See the following example, which uses a hold-tap behavior definition, configured
behaviors {
pht: positional_hold_tap {
compatible = "zmk,behavior-hold-tap";
label = "POSITIONAL_HOLD_TAP";
#binding-cells = <2>;
flavor = "hold-preferred";
tapping-term-ms = <400>;
@@ -115,7 +113,6 @@ See the following example, which uses a hold-tap behavior definition, configured
};
keymap {
compatible = "zmk,keymap";
label ="Default keymap";
default_layer {
bindings = <
// position 0 position 1 position 2
@@ -172,9 +169,8 @@ The following are suggested hold-tap configurations that work well with home row
/ {
behaviors {
lh_pht: left_hand_positional_hold_tap {
lh_pht: left_positional_hold_tap {
compatible = "zmk,behavior-hold-tap";
label = "LEFT_POSITIONAL_HOLD_TAP";
#binding-cells = <2>;
flavor = "tap-unless-interrupted";
tapping-term-ms = <100>; // <---[[produces tap if held longer than tapping-term-ms]]
@@ -206,7 +202,6 @@ The following are suggested hold-tap configurations that work well with home row
behaviors {
hm: homerow_mods {
compatible = "zmk,behavior-hold-tap";
label = "HOMEROW_MODS";
#binding-cells = <2>;
tapping-term-ms = <150>;
quick-tap-ms = <0>;
@@ -236,7 +231,6 @@ The following are suggested hold-tap configurations that work well with home row
behaviors {
bhm: balanced_homerow_mods {
compatible = "zmk,behavior-hold-tap";
label = "HOMEROW_MODS";
#binding-cells = <2>;
tapping-term-ms = <200>; // <---[[moderate duration]]
quick-tap-ms = <0>;
@@ -272,7 +266,6 @@ A popular method of implementing Autoshift in ZMK involves a C-preprocessor macr
behaviors {
as: auto_shift {
compatible = "zmk,behavior-hold-tap";
label = "AUTO_SHIFT";
#binding-cells = <2>;
tapping_term_ms = <135>;
quick_tap_ms = <0>;
@@ -308,7 +301,6 @@ This hold-tap example implements a [momentary-layer](layers.md/#momentary-layer)
behaviors {
mo_tog: behavior_mo_tog {
compatible = "zmk,behavior-hold-tap";
label = "mo_tog";
#binding-cells = <2>;
flavor = "hold-preferred";
tapping-term-ms = <200>;

View File

@@ -18,7 +18,6 @@ A macro definition looks like:
/ {
macros {
zed_em_kay: zed_em_kay {
label = "ZM_zed_em_kay";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
@@ -239,7 +238,6 @@ To achieve this, a combination of a 0ms wait time and splitting the press and re
* `&lm NUM_LAYER LSHIFT`
*/
lm: lm {
label = "LAYER_MOD";
compatible = "zmk,behavior-macro-two-param";
wait-ms = <0>;
tap-ms = <0>;
@@ -323,7 +321,6 @@ This can be used instead of a complete macro definition. During the firmware bui
```dts
my_zero_param_macro: my_zero_param_macro {
compatible = "zmk,behavior-macro";
label = "ZM_my_macro";
#binding-cells = <0>;
wait-ms = <30>;
tap-ms = <40>;

View File

@@ -23,7 +23,6 @@ An example of how to implement the mod-morph "Grave Escape":
behaviors {
gresc: grave_escape {
compatible = "zmk,behavior-mod-morph";
label = "GRAVE_ESCAPE";
#binding-cells = <0>;
bindings = <&kp ESC>, <&kp GRAVE>;
mods = <(MOD_LGUI|MOD_LSFT|MOD_RGUI|MOD_RSFT)>;
@@ -79,7 +78,6 @@ For example, the following configuration morphs `LEFT_SHIFT` + `BACKSPACE` into
behaviors {
bspc_del: backspace_delete {
compatible = "zmk,behavior-mod-morph";
label = "BACKSPACE_DELETE";
#binding-cells = <0>;
bindings = <&kp BACKSPACE>, <&kp DELETE>;
mods = <(MOD_LSFT|MOD_RSFT)>;

View File

@@ -24,7 +24,6 @@ Here is an example that binds the [RGB Underglow Behavior](/docs/behaviors/under
behaviors {
rgb_encoder: rgb_encoder {
compatible = "zmk,behavior-sensor-rotate";
label = "RGB_ENCODER";
#sensor-binding-cells = <0>;
bindings = <&rgb_ug RGB_BRI>, <&rgb_ug RGB_BRD>;
};
@@ -58,9 +57,8 @@ First, defining the sensor rotation itself, binding the [Key Press Behavior](/do
```dts
/ {
behaviors {
rot_kp: behavior_sensor_rotate_kp {
rot_kp: sensor_rotate_kp {
compatible = "zmk,behavior-sensor-rotate-var";
label = "ENC_KP";
#sensor-binding-cells = <2>;
bindings = <&kp>, <&kp>;
};

View File

@@ -61,7 +61,6 @@ This configuration would apply to all sticky keys. This may not be appropriate i
behaviors {
skq: sticky_key_quick_release {
compatible = "zmk,behavior-sticky-key";
label = "STICKY_KEY_QUICK_RELEASE";
#binding-cells = <1>;
bindings = <&kp>;
release-after-ms = <1000>;

View File

@@ -45,7 +45,6 @@ This example configures a tap-dance named `td0` that outputs the number of times
behaviors {
td0: tap_dance_0 {
compatible = "zmk,behavior-tap-dance";
label = "TAP_DANCE_0";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&kp N1>, <&kp N2>, <&kp N3>;
@@ -86,7 +85,6 @@ This example configures a mod-tap inside a tap-dance named `td_mt` that outputs
behaviors {
td_mt: tap_dance_mod_tap {
compatible = "zmk,behavior-tap-dance";
label = "TAP_DANCE_MOD_TAP";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&mt LSHIFT CAPSLOCK>, <&kp LCTRL>;

View File

@@ -48,7 +48,7 @@ See [Zephyr's voltage divider documentation](https://docs.zephyrproject.org/late
## nRF VDDH Battery Sensor
Driver for reading the voltage of a battery using a Nordic nRF52's VDDH pin. This driver has no configuration except for the required `label` property.
Driver for reading the voltage of a battery using a Nordic nRF52's VDDH pin.
### Devicetree
@@ -56,6 +56,4 @@ Applies to: `compatible = "zmk,battery-nrf-vddh"`
Definition file: [zmk/app/module/dts/bindings/sensor/zmk,battery-nrf-vddh.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/module/dts/bindings/sensor/zmk%2Cbattery-nrf-vddh.yaml)
| Property | Type | Description |
| -------- | ------ | ------------------------- |
| `label` | string | Unique label for the node |
This driver has no configuration.

View File

@@ -29,12 +29,11 @@ Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-caps-word.yaml](ht
Applies to: `compatible = "zmk,behavior-caps-word"`
| Property | Type | Description | Default |
| ---------------- | ------ | ------------------------------------------------------------------ | ------------------------------- |
| `label` | string | Unique label for the node | |
| `#binding-cells` | int | Must be `<0>` | |
| `continue-list` | array | List of [key codes](/docs/codes) which do not deactivate caps lock | `<UNDERSCORE BACKSPACE DELETE>` |
| `mods` | int | A bit field of modifiers to apply | `<MOD_LSFT>` |
| Property | Type | Description | Default |
| ---------------- | ----- | ------------------------------------------------------------------ | ------------------------------- |
| `#binding-cells` | int | Must be `<0>` | |
| `continue-list` | array | List of [key codes](/docs/codes) which do not deactivate caps lock | `<UNDERSCORE BACKSPACE DELETE>` |
| `mods` | int | A bit field of modifiers to apply | `<MOD_LSFT>` |
`continue-list` is treated as if it always includes alphanumeric characters (A-Z, 0-9).
@@ -60,7 +59,6 @@ Applies to: `compatible = "zmk,behavior-hold-tap"`
| Property | Type | Description | Default |
| ---------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------- | ------------------ |
| `label` | string | Unique label for the node | |
| `#binding-cells` | int | Must be `<2>` | |
| `bindings` | phandle array | 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"` |
@@ -100,11 +98,10 @@ Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-key-repeat.yaml](h
Applies to: `compatible = "zmk,behavior-key-repeat"`
| Property | Type | Description | Default |
| ---------------- | ------ | -------------------------------- | ----------------- |
| `label` | string | Unique label for the node | |
| `#binding-cells` | int | Must be `<0>` | |
| `usage-pages` | array | List of HID usage pages to track | `<HID_USAGE_KEY>` |
| Property | Type | Description | Default |
| ---------------- | ----- | -------------------------------- | ----------------- |
| `#binding-cells` | int | Must be `<0>` | |
| `usage-pages` | array | List of HID usage pages to track | `<HID_USAGE_KEY>` |
For the `usage-pages` property, use the `HID_USAGE_*` defines from [dt-bindings/zmk/hid_usage_pages.h](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/hid_usage_pages.h).
@@ -133,7 +130,6 @@ Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-macro.yaml](https:
| Property | Type | Description | Default |
| ---------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| `label` | string | Unique label for the node | |
| `compatible` | string | Macro type, **must be _one_ of**:<br/>• `"zmk,behavior-macro"`<br/>• `"zmk,behavior-macro-one-param"`<br/>• `"zmk,behavior-macro-two-param"` | |
| `#binding-cells` | int | Number of params accepted (depends on `compatible` property), **must be _one_ of**:<br/>• `<0>`<br/>• `<1>`<br/>• `<2>` | |
| `bindings` | phandle array | List of behaviors to trigger | |
@@ -169,7 +165,6 @@ Applies to: `compatible = "zmk,behavior-mod-morph"`
| Property | Type | Description |
| ---------------- | ------------- | --------------------------------------------------------------------------------- |
| `label` | string | Unique label for the node |
| `#binding-cells` | int | Must be `<0>` |
| `bindings` | phandle array | A list of two behaviors: one for normal press and one for mod morphed press |
| `mods` | int | A bit field of modifiers. The morph behavior is used if any of these are pressed. |
@@ -196,7 +191,6 @@ Applies to: `compatible = "zmk,behavior-sticky-key"`
| Property | Type | Description | Default |
| ------------------ | ------------- | ------------------------------------------------------------------------ | ------- |
| `label` | string | Unique label for the node | |
| `#binding-cells` | int | Must match the number of parameters the `bindings` behavior uses | |
| `bindings` | phandle array | A behavior (without parameters) to trigger | |
| `release-after-ms` | int | Releases the key after this many milliseconds if no other key is pressed | 1000 |
@@ -222,7 +216,6 @@ Applies to: `compatible = "zmk,behavior-tap-dance"`
| Property | Type | Description | Default |
| ----------------- | ------------- | -------------------------------------------------------------------------------------------- | ------- |
| `label` | string | Unique label for the node | |
| `#binding-cells` | int | Must be `<0>` | |
| `bindings` | phandle array | A list of behaviors from which to select | |
| `tapping-term-ms` | int | The maximum time (in milliseconds) between taps before an item from `bindings` is triggered. | 200 |

View File

@@ -77,7 +77,6 @@ Definition file: [zmk/app/module/dts/bindings/sensor/alps,ec11.yaml](https://git
| Property | Type | Description | Default |
| --------- | ---------- | ---------------------------------------------- | ------- |
| `label` | string | Unique label for the node | |
| `a-gpios` | GPIO array | GPIO connected to the encoder's A pin | |
| `b-gpios` | GPIO array | GPIO connected to the encoder's B pin | |
| `steps` | int | Number of encoder pulses per complete rotation | |

View File

@@ -122,7 +122,6 @@ Devicetree files look like this:
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
};
};
```

View File

@@ -48,7 +48,6 @@ Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-demux.yaml](h
| Property | Type | Description | Default |
| ----------------------- | ---------- | -------------------------------- | ------- |
| `label` | string | Unique label for the node | |
| `input-gpios` | GPIO array | Input GPIOs | |
| `output-gpios` | GPIO array | Demultiplexer address GPIOs | |
| `debounce-period` | int | Debounce period in milliseconds | 5 |
@@ -74,7 +73,6 @@ Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-direct.yaml](
| Property | Type | Description | Default |
| ------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------- | ------- |
| `label` | string | Unique label for the node | |
| `input-gpios` | GPIO array | Input GPIOs (one per key) | |
| `debounce-press-ms` | int | Debounce time for key press in milliseconds. Use 0 for eager debouncing. | 5 |
| `debounce-release-ms` | int | Debounce time for key release in milliseconds. | 5 |
@@ -118,7 +116,6 @@ Definition file: [zmk/app/module/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml](
| Property | Type | Description | Default |
| ------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------- | ----------- |
| `label` | string | Unique label for the node | |
| `row-gpios` | GPIO array | Matrix row GPIOs in order, starting from the top row | |
| `col-gpios` | GPIO array | Matrix column GPIOs in order, starting from the leftmost row | |
| `debounce-press-ms` | int | Debounce time for key press in milliseconds. Use 0 for eager debouncing. | 5 |
@@ -162,17 +159,15 @@ Applies to : `compatible = "zmk,kscan-composite"`
Definition file: [zmk/app/dts/bindings/zmk,kscan-composite.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/zmk,kscan-composite.yaml)
| Property | Type | Description | Default |
| -------- | ------ | --------------------------------------------- | ------- |
| `label` | string | Unique label for the node | |
| `rows` | int | The number of rows in the composite matrix | |
| `cols` | int | The number of columns in the composite matrix | |
| Property | Type | Description | Default |
| -------- | ---- | --------------------------------------------- | ------- |
| `rows` | int | The number of rows in the composite matrix | |
| `cols` | int | The number of columns in the composite matrix | |
The `zmk,kscan-composite` node should have one child node per keyboard scan driver that should be composited. Each child node can have the following properties:
| Property | Type | Description | Default |
| --------------- | ------- | ------------------------------------------------------------------------------ | ------- |
| `label` | string | Unique label for the node | |
| `kscan` | phandle | Label of the kscan driver to include | |
| `row-offset` | int | Shifts row 0 of the included driver to a new row in the composite matrix | 0 |
| `column-offset` | int | Shifts column 0 of the included driver to a new column in the composite matrix | 0 |
@@ -237,7 +232,6 @@ One possible way to do this is a 3x4 matrix where the direct GPIO keys are shift
kscan0: kscan_composite {
compatible = "zmk,kscan-composite";
label = "KSCAN0";
rows = <4>;
columns = <3>;
@@ -275,14 +269,13 @@ Applies to: `compatible = "zmk,kscan-mock"`
Definition file: [zmk/app/dts/bindings/zmk,kscan-mock.yaml](https://github.com/zmkfirmware/zmk/blob/main/app/dts/bindings/zmk%2Ckscan-mock.yaml)
| Property | Type | Description | Default |
| -------------- | ------ | --------------------------------------------- | ------- |
| `label` | string | Unique label for the node | |
| `event-period` | int | Milliseconds between each generated event | |
| `events` | array | List of key events to simulate | |
| `rows` | int | The number of rows in the composite matrix | |
| `cols` | int | The number of columns in the composite matrix | |
| `exit-after` | bool | Exit the program after running all events | false |
| Property | Type | Description | Default |
| -------------- | ----- | --------------------------------------------- | ------- |
| `event-period` | int | Milliseconds between each generated event | |
| `events` | array | List of key events to simulate | |
| `rows` | int | The number of rows in the composite matrix | |
| `cols` | int | The number of columns in the composite matrix | |
| `exit-after` | bool | Exit the program after running all events | false |
The `events` array should be defined using the macros from [app/module/include/dt-bindings/zmk/kscan_mock.h](https://github.com/zmkfirmware/zmk/blob/main/app/module/include/dt-bindings/zmk/kscan_mock.h).

View File

@@ -42,6 +42,5 @@ Applies to: `compatible = "zmk,ext-power-generic"`
| Property | Type | Description |
| --------------- | ---------- | ------------------------------------------------------------- |
| `label` | string | Unique label for the node |
| `control-gpios` | GPIO array | List of GPIOs which should be active to enable external power |
| `init-delay-ms` | int | number of milliseconds to delay after initializing the driver |

View File

@@ -370,7 +370,6 @@ For the purpose of this section, we will discuss the structure of `app/dts/behav
behaviors {
/omit-if-no-ref/ gresc: grave_escape {
compatible = "zmk,behavior-mod-morph";
label = "GRAVE_ESCAPE";
#binding-cells = <0>;
bindings = <&kp ESC>, <&kp GRAVE>;
mods = <(MOD_LGUI|MOD_LSFT|MOD_RGUI|MOD_RSFT)>;

View File

@@ -144,7 +144,6 @@ this might look something like:
kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
col-gpios
@@ -203,7 +202,6 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,2) RC(4,9) RC(3,6) RC(3,7)
kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
row-gpios
@@ -432,7 +430,6 @@ In your device tree file you will need to add the following lines to define the
```dts
left_encoder: encoder_left {
compatible = "alps,ec11";
label = "LEFT_ENCODER";
a-gpios = <PIN_A (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <PIN_B (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
steps = <80>;

View File

@@ -242,7 +242,6 @@ Add each of your LEDs to the backlight node in the same manner as for one LED, u
```dts
backlight: pwmleds {
compatible = "pwm-leds";
label = "Backlight LEDs";
pwm_led_0: pwm_led_0 {
pwms = <&pwm0 0 PWM_MSEC(10) PWM_POLARITY_NORMAL>;
};

View File

@@ -34,7 +34,6 @@ Once you have the sensor driver defined, add a `zmk,battery` property to the `ch
vbatt: vbatt {
compatible = "zmk,battery-nrf-vddh";
label = "VBATT";
};
}
```

View File

@@ -98,7 +98,6 @@ Here's an example on a definition that uses P0.06:
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
@@ -142,7 +141,6 @@ Here's another example for a non-nRF52 board on `spi3`:
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
/* SPI */
reg = <0>;