docs: Make default keymap in new shield guide complete (#2825)

Co-authored-by: Nicolas Munnich <98408764+Nick-Munnich@users.noreply.github.com>
This commit is contained in:
Cem Aksoylar 2025-02-17 11:55:42 -08:00 committed by GitHub
parent e8ec9b65f8
commit 9d234cbb10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -489,11 +489,13 @@ If all of your physical layouts use the same `kscan` node under the hood, you ca
Each keyboard should provide a default keymap to be used when building the firmware, which can be overridden and customized by user configs. Each keyboard should provide a default keymap to be used when building the firmware, which can be overridden and customized by user configs.
For "shield keyboards", this should be placed in the `boards/shields/my_keyboard/my_keyboard.keymap` file. For "shield keyboards", this should be placed in the `boards/shields/my_keyboard/my_keyboard.keymap` file.
The keymap is configured as an additional devicetree overlay that includes the following:
Here is an example simple keymap for a 3x3 macropad, with only one layer: Here is an example simple keymap for a 3x3 macropad, with only one layer:
```dts title="my_keyboard.keymap" ```dts title="my_keyboard.keymap"
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
/ { / {
keymap { keymap {
compatible = "zmk,keymap"; compatible = "zmk,keymap";