feat(keymap): create master header for dt-bindings imports
This commit is contained in:
parent
f019524600
commit
c72112c017
10 changed files with 46 additions and 4 deletions
18
app/include/dt-bindings/zmk/params.h
Normal file
18
app/include/dt-bindings/zmk/params.h
Normal 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"
|
|
@ -1,6 +1,6 @@
|
|||
```dts
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/params.h>
|
||||
|
||||
/ {
|
||||
keymap {
|
||||
|
|
|
@ -9,6 +9,10 @@ This page contains [backlight](../../features/backlight.mdx) behaviors supported
|
|||
|
||||
## 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,
|
||||
which is added at the top of the keymap file:
|
||||
|
||||
|
|
|
@ -27,6 +27,10 @@ even if OUT_USB is selected. To remain disconnected, another bluetooth profile m
|
|||
|
||||
## 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,
|
||||
which is added at the top of the keymap file:
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@ For advanced users, user-defined HID usages are also supported but must be encod
|
|||
## Keycode Defines
|
||||
|
||||
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:
|
||||
|
||||
```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
|
||||
|
|
|
@ -27,6 +27,10 @@ If you use the mouse key press behavior in your keymap, the feature will automat
|
|||
|
||||
## 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
|
||||
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:
|
||||
|
|
|
@ -20,6 +20,10 @@ to select the BLE output through below behavior to be able to send keystrokes to
|
|||
|
||||
## 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)
|
||||
header, which is added at the top of the keymap file:
|
||||
|
||||
|
|
|
@ -21,6 +21,10 @@ The following boards currently support this feature:
|
|||
|
||||
## 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,
|
||||
which is added at the top of the keymap file:
|
||||
|
||||
|
|
|
@ -9,6 +9,10 @@ This page contains [RGB Underglow](../../features/underglow.md) behaviors suppor
|
|||
|
||||
## 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,
|
||||
which is added at the top of the keymap file:
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ The top two lines of most keymaps should include:
|
|||
|
||||
```dts
|
||||
#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`.
|
||||
|
|
Loading…
Add table
Reference in a new issue