Skip to content

Commit

Permalink
docs: Make default keymap in new shield guide complete
Browse files Browse the repository at this point in the history
  • Loading branch information
caksoylar committed Feb 17, 2025
1 parent 5926269 commit 19b1a3f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/docs/development/hardware-integration/new-shield.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,12 @@ 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.
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:

```dts title="my_keyboard.keymap"
#include <dt-bindings/zmk/keys.h>
/ {
keymap {
compatible = "zmk,keymap";
Expand All @@ -514,7 +515,7 @@ Here is an example simple keymap for a 3x3 macropad, with only one layer:

The keymap should match the order of the keys in the [matrix transform](#matrix-transform) exactly, left to right, top to bottom (they are both 1 dimensional arrays rearranged with newline characters for better legibility).
See [Keymaps](../../keymaps/index.mdx) for information on defining keymaps in ZMK.
If you wish to use [ZMK Studio](../../features/studio.md) with your keyboard, make sure to assign the [ZMK Studio unlocking behavior](../../keymaps/behaviors/studio-unlock.md) to a key in your keymap.
If you wish to use [ZMK Studio](../../features/studio.md) with your keyboard, make sure to assign the [ZMK Studio unlocking behavior](../../keymaps/behaviors/studio-unlock.md) to a key in the keymap.

## Metadata

Expand Down

0 comments on commit 19b1a3f

Please sign in to comment.