feat(keymap): create master header for dt-bindings imports

This commit is contained in:
Thomas Huber 2024-08-06 13:41:31 -07:00
parent f019524600
commit c72112c017
No known key found for this signature in database
GPG key ID: C8B2604C5DD56D87
10 changed files with 46 additions and 4 deletions

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include "backlight.h"
#include "bt.h"
#include "ext_power.h"
#include "hid_usage.h"
#include "hid_usage_pages.h"
#include "keys.h"
#include "matrix_transform.h"
#include "modifiers.h"
#include "mouse.h"
#include "outputs.h"
#include "reset.h"
#include "rgb.h"

View file

@ -1,6 +1,6 @@
```dts ```dts
#include <behaviors.dtsi> #include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h> #include <dt-bindings/zmk/params.h>
/ { / {
keymap { keymap {

View file

@ -9,6 +9,10 @@ This page contains [backlight](../../features/backlight.mdx) behaviors supported
## Backlight Action Defines ## Backlight Action Defines
:::info
No longer required as long as your keymap includes [`dt-bindings/zmk/params.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/all.h).
:::
Backlight actions defines are provided through the [`dt-bindings/zmk/backlight.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/backlight.h) header, Backlight actions defines are provided through the [`dt-bindings/zmk/backlight.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/backlight.h) header,
which is added at the top of the keymap file: which is added at the top of the keymap file:

View file

@ -27,6 +27,10 @@ even if OUT_USB is selected. To remain disconnected, another bluetooth profile m
## Bluetooth Command Defines ## Bluetooth Command Defines
:::info
No longer required as long as your keymap includes [`dt-bindings/zmk/params.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/all.h).
:::
Bluetooth command defines are provided through the [`dt-bindings/zmk/bt.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/bt.h) header, Bluetooth command defines are provided through the [`dt-bindings/zmk/bt.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/bt.h) header,
which is added at the top of the keymap file: which is added at the top of the keymap file:

View file

@ -24,11 +24,11 @@ For advanced users, user-defined HID usages are also supported but must be encod
## Keycode Defines ## Keycode Defines
To make it easier to encode the HID keycode numeric values, most keymaps include To make it easier to encode the HID keycode numeric values, most keymaps include
the [`dt-bindings/zmk/keys.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/keys.h) header the [`dt-bindings/zmk/params.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/all.h) header
provided by ZMK near the top: provided by ZMK near the top:
```dts ```dts
#include <dt-bindings/zmk/keys.h> #include <dt-bindings/zmk/params.h>
``` ```
Doing so makes a set of defines such as `A`, `N1`, etc. available for use with these behaviors Doing so makes a set of defines such as `A`, `N1`, etc. available for use with these behaviors

View file

@ -27,6 +27,10 @@ If you use the mouse key press behavior in your keymap, the feature will automat
## Mouse Button Defines ## Mouse Button Defines
:::info
No longer required as long as your keymap includes [`dt-bindings/zmk/params.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/all.h).
:::
To make it easier to encode the HID mouse button numeric values, include To make it easier to encode the HID mouse button numeric values, include
the [`dt-bindings/zmk/mouse.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/mouse.h) header the [`dt-bindings/zmk/mouse.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/mouse.h) header
provided by ZMK near the top: provided by ZMK near the top:

View file

@ -20,6 +20,10 @@ to select the BLE output through below behavior to be able to send keystrokes to
## Output Command Defines ## Output Command Defines
:::info
No longer required as long as your keymap includes [`dt-bindings/zmk/params.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/all.h).
:::
Output command defines are provided through the [`dt-bindings/zmk/outputs.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/outputs.h) Output command defines are provided through the [`dt-bindings/zmk/outputs.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/outputs.h)
header, which is added at the top of the keymap file: header, which is added at the top of the keymap file:

View file

@ -21,6 +21,10 @@ The following boards currently support this feature:
## External Power Control Command Defines ## External Power Control Command Defines
:::info
No longer required as long as your keymap includes [`dt-bindings/zmk/params.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/all.h).
:::
External power control command defines are provided through the [`dt-bindings/zmk/ext_power.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/ext_power.h) header, External power control command defines are provided through the [`dt-bindings/zmk/ext_power.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/ext_power.h) header,
which is added at the top of the keymap file: which is added at the top of the keymap file:

View file

@ -9,6 +9,10 @@ This page contains [RGB Underglow](../../features/underglow.md) behaviors suppor
## RGB Action Defines ## RGB Action Defines
:::info
No longer required as long as your keymap includes [`dt-bindings/zmk/params.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/all.h).
:::
RGB actions defines are provided through the [`dt-bindings/zmk/rgb.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/rgb.h) header, RGB actions defines are provided through the [`dt-bindings/zmk/rgb.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/rgb.h) header,
which is added at the top of the keymap file: which is added at the top of the keymap file:

View file

@ -91,7 +91,7 @@ The top two lines of most keymaps should include:
```dts ```dts
#include <behaviors.dtsi> #include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h> #include <dt-bindings/zmk/all.h>
``` ```
The first defines the nodes for all the available behaviors in ZMK, which will be referenced in the behavior bindings. This is how bindings like `&kp` can reference the key press behavior defined with an anchor name of `kp`. The first defines the nodes for all the available behaviors in ZMK, which will be referenced in the behavior bindings. This is how bindings like `&kp` can reference the key press behavior defined with an anchor name of `kp`.