refactor(docs): Convert the keymaps section into a base folder (#2430)

Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
This commit is contained in:
Nicolas Munnich
2024-08-21 19:39:18 +02:00
committed by GitHub
parent 503f6c8e58
commit 5f056f7199
77 changed files with 399 additions and 526 deletions

View File

@@ -21,7 +21,7 @@ Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/
| `CONFIG_ZMK_BACKLIGHT_AUTO_OFF_USB` | bool | Turn off backlight when USB is disconnected | n |
:::note
The `*_START` settings only determine the initial backlight state. Any changes you make with the [backlight behavior](../behaviors/backlight.md) are saved to flash after a one minute delay and will be used after that.
The `*_START` settings only determine the initial backlight state. Any changes you make with the [backlight behavior](../keymaps/behaviors/backlight.md) are saved to flash after a one minute delay and will be used after that.
:::
## Devicetree

View File

@@ -21,7 +21,7 @@ See the [zmk/app/dts/behaviors/](https://github.com/zmkfirmware/zmk/tree/main/ap
Creates a custom behavior that behaves similar to a caps lock but deactivates when any key not in a continue list is pressed.
See the [caps word behavior](../behaviors/caps-word.md) documentation for more details and examples.
See the [caps word behavior](../keymaps/behaviors/caps-word.md) documentation for more details and examples.
### Devicetree
@@ -29,11 +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 |
| ---------------- | ----- | ------------------------------------------------------------------ | ------------------------------- |
| `#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 [keycodes](/docs/keymaps/list-of-keycodes) 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).
@@ -41,15 +41,15 @@ See [dt-bindings/zmk/modifiers.h](https://github.com/zmkfirmware/zmk/blob/main/a
You can use the following nodes to tweak the default behaviors:
| Node | Behavior |
| ------------ | -------------------------------------- |
| `&caps_word` | [Caps Word](../behaviors/caps-word.md) |
| Node | Behavior |
| ------------ | ---------------------------------------------- |
| `&caps_word` | [Caps Word](../keymaps/behaviors/caps-word.md) |
## Hold-Tap
Creates a custom behavior that triggers one behavior when a key is held or a different one when the key is tapped.
See the [hold-tap behavior](../behaviors/hold-tap.mdx) documentation for more details and examples.
See the [hold-tap behavior](../keymaps/behaviors/hold-tap.mdx) documentation for more details and examples.
### Kconfig
@@ -86,22 +86,22 @@ The `flavor` property may be one of:
- `"tap-preferred"`
- `"tap-unless-interrupted"`
See the [hold-tap behavior documentation](../behaviors/hold-tap.mdx) for an explanation of each flavor.
See the [hold-tap behavior documentation](../keymaps/behaviors/hold-tap.mdx) for an explanation of each flavor.
`hold-trigger-key-positions` is an array of zero-based key position indices.
You can use the following nodes to tweak the default behaviors:
| Node | Behavior |
| ----- | --------------------------------------------- |
| `&lt` | [Layer-tap](../behaviors/layers.md#layer-tap) |
| `&mt` | [Mod-tap](../behaviors/mod-tap.md) |
| Node | Behavior |
| ----- | ----------------------------------------------------- |
| `&lt` | [Layer-tap](../keymaps/behaviors/layers.md#layer-tap) |
| `&mt` | [Mod-tap](../keymaps/behaviors/mod-tap.md) |
## Key Repeat
Creates a custom behavior that repeats the whatever key code was last sent.
See the [key repeat behavior](../behaviors/key-repeat.md) documentation for more details and examples.
See the [key repeat behavior](../keymaps/behaviors/key-repeat.md) documentation for more details and examples.
### Devicetree
@@ -118,15 +118,15 @@ For the `usage-pages` property, use the `HID_USAGE_*` defines from [dt-bindings/
You can use the following nodes to tweak the default behaviors:
| Node | Behavior |
| ------------- | ---------------------------------------- |
| `&key_repeat` | [Key repeat](../behaviors/key-repeat.md) |
| Node | Behavior |
| ------------- | ------------------------------------------------ |
| `&key_repeat` | [Key repeat](../keymaps/behaviors/key-repeat.md) |
## Macro
Creates a custom behavior which triggers a sequence of other behaviors.
See the [macro behavior](../behaviors/macros.md) documentation for more details and examples.
See the [macro behavior](../keymaps/behaviors/macros.md) documentation for more details and examples.
### Kconfig
@@ -174,7 +174,7 @@ The following macro-specific behaviors can be added at any point in the `binding
Creates a custom behavior that triggers one of two behaviors depending on whether certain modifiers are held.
See the [mod-morph behavior](../behaviors/mod-morph.md) documentation for more details and examples.
See the [mod-morph behavior](../keymaps/behaviors/mod-morph.md) documentation for more details and examples.
### Devicetree
@@ -192,16 +192,16 @@ See [dt-bindings/zmk/modifiers.h](https://github.com/zmkfirmware/zmk/blob/main/a
You can use the following nodes to tweak the default behaviors:
| Node | Behavior |
| -------- | ----------------------------------------- |
| `&gresc` | [Grave escape](../behaviors/mod-morph.md) |
| Node | Behavior |
| -------- | ------------------------------------------------- |
| `&gresc` | [Grave escape](../keymaps/behaviors/mod-morph.md) |
## Sensor Rotation
Creates a custom behavior which sends a tap of other behaviors when a sensor is rotated.
Has two variants: with `compatible = "zmk,behavior-sensor-rotate"` it accepts no parameters when used, whereas with `compatible = "zmk,behavior-sensor-rotate-var"` it accepts two parameters.
See the [sensor rotation behavior](../behaviors/sensor-rotate.md) documentation for more details and examples.
See the [sensor rotation behavior](../keymaps/behaviors/sensor-rotate.md) documentation for more details and examples.
### Devicetree
@@ -232,7 +232,7 @@ With `compatible = "zmk,behavior-sensor-rotate-var"`, this behavior forwards the
Creates a custom behavior that triggers a behavior and keeps it pressed it until another key is pressed and released.
See the [sticky key behavior](../behaviors/sticky-key.md) and [sticky layer behavior](../behaviors/sticky-layer.md) documentation for more details and examples.
See the [sticky key behavior](../keymaps/behaviors/sticky-key.md) and [sticky layer behavior](../keymaps/behaviors/sticky-layer.md) documentation for more details and examples.
### Kconfig
@@ -259,16 +259,16 @@ This behavior forwards the one parameter it receives to the parameter of the beh
You can use the following nodes to tweak the default behaviors:
| Node | Behavior |
| ----- | -------------------------------------------- |
| `&sk` | [Sticky key](../behaviors/sticky-key.md) |
| `&sl` | [Sticky layer](../behaviors/sticky-layer.md) |
| Node | Behavior |
| ----- | ---------------------------------------------------- |
| `&sk` | [Sticky key](../keymaps/behaviors/sticky-key.md) |
| `&sl` | [Sticky layer](../keymaps/behaviors/sticky-layer.md) |
## Tap Dance
Creates a custom behavior that triggers a different behavior corresponding to the number of times the key is tapped.
See the [tap dance behavior](../behaviors/tap-dance.mdx) documentation for more details and examples.
See the [tap dance behavior](../keymaps/behaviors/tap-dance.mdx) documentation for more details and examples.
### Devicetree

View File

@@ -3,7 +3,7 @@ title: Combo Configuration
sidebar_label: Combos
---
See the [Combos feature page](../features/combos.md) for more details and examples.
See the [Combos informational page](../keymaps/combos.md) for more details and examples.
See [Configuration Overview](index.md) for instructions on how to change these settings.
@@ -33,7 +33,7 @@ Each child node can have the following properties:
| Property | Type | Description | Default |
| ----------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `bindings` | phandle-array | A [behavior](../features/keymaps.mdx#behaviors) to run when the combo is triggered | |
| `bindings` | phandle-array | A [behavior](../keymaps/index.mdx#behaviors) to run when the combo is triggered | |
| `key-positions` | array | A list of key position indices for the keys which should trigger the combo | |
| `timeout-ms` | int | All the keys in `key-positions` must be pressed within this time in milliseconds to trigger the combo | 50 |
| `require-prior-idle-ms` | int | If any non-modifier key is pressed within `require-prior-idle-ms` before a key in the combo, the key will not be considered for the combo | -1 (disabled) |

View File

@@ -3,7 +3,7 @@ title: Encoder Configuration
sidebar_label: Encoders
---
See the [Encoders feature page](../features/encoders.md) for more details, including instructions for adding encoder support to a board.
See the [Encoders informational page](../features/encoders.md) for more details, including instructions for adding encoder support to a board.
See [Configuration Overview](index.md) for instructions on how to change these settings.

View File

@@ -17,11 +17,11 @@ The `zmk,keymap` node itself has no properties. It should have one child node pe
Each child node can have the following properties:
| Property | Type | Description |
| ----------------- | ------------- | ----------------------------------------------------------------------- |
| `display-name` | string | Name for the layer on displays |
| `bindings` | phandle-array | List of [key behaviors](../features/keymaps.mdx#behaviors), one per key |
| `sensor-bindings` | phandle-array | List of sensor behaviors, one per sensor |
| Property | Type | Description |
| ----------------- | ------------- | -------------------------------------------------------------------- |
| `display-name` | string | Name for the layer on displays |
| `bindings` | phandle-array | List of [key behaviors](../keymaps/index.mdx#behaviors), one per key |
| `sensor-bindings` | phandle-array | List of sensor behaviors, one per sensor |
Items for `bindings` must be listed in the order the keys are defined in the [keyboard scan configuration](kscan.md).

View File

@@ -26,7 +26,7 @@ Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/
## Soft Off
The [soft off feature](../features/soft-off.md) allows turning the keyboard on/off from either dedicated hardware, or using the [`&soft_off` behavior](../behaviors/soft-off.md) to turn off and a reset button to turn back on again.
The [soft off feature](../features/soft-off.md) allows turning the keyboard on/off from either dedicated hardware, or using the [`&soft_off` behavior](../keymaps/behaviors/soft-off.md) to turn off and a reset button to turn back on again.
### Kconfig
@@ -38,7 +38,7 @@ Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/
## External Power Control
Driver for enabling or disabling power to peripherals such as displays and lighting. This driver must be configured to use [power management behaviors](../behaviors/power.md).
Driver for enabling or disabling power to peripherals such as displays and lighting. This driver must be configured to use [power management behaviors](../keymaps/behaviors/power.md).
### Kconfig

View File

@@ -41,7 +41,7 @@ Values for `CONFIG_ZMK_RGB_UNDERGLOW_EFF_START`:
| 3 | Swirl |
:::note
The `*_START` settings only determine the initial underglow state. Any changes you make with the [underglow behavior](../behaviors/underglow.md) are saved to flash after a one minute delay and will be used after that.
The `*_START` settings only determine the initial underglow state. Any changes you make with the [underglow behavior](../keymaps/behaviors/underglow.md) are saved to flash after a one minute delay and will be used after that.
:::
## Devicetree