diff options
Diffstat (limited to 'docs/feature_layouts.md')
| -rw-r--r-- | docs/feature_layouts.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md index bfae92044..1ee8b5e35 100644 --- a/docs/feature_layouts.md +++ b/docs/feature_layouts.md | |||
| @@ -53,6 +53,8 @@ but the `LAYOUT_<layout>` variable must be defined in `<folder>.h` as well. | |||
| 53 | 53 | ||
| 54 | ## Tips for Making Layouts Keyboard-Agnostic | 54 | ## Tips for Making Layouts Keyboard-Agnostic |
| 55 | 55 | ||
| 56 | ### Includes | ||
| 57 | |||
| 56 | Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<folder>.h` should not be included here) file that is being compiled: | 58 | Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<folder>.h` should not be included here) file that is being compiled: |
| 57 | 59 | ||
| 58 | #include QMK_KEYBOARD_H | 60 | #include QMK_KEYBOARD_H |
| @@ -72,3 +74,7 @@ For example: | |||
| 72 | ``` | 74 | ``` |
| 73 | 75 | ||
| 74 | Note that the names are lowercase and match the folder/file names for the keyboard/revision exactly. | 76 | Note that the names are lowercase and match the folder/file names for the keyboard/revision exactly. |
| 77 | |||
| 78 | ### Keymaps | ||
| 79 | |||
| 80 | In order to support both split and non-split keyboards with the same layout, you need to use the keyboard agnostic `LAYOUT_<layout name>` macro in your keymap. For instance, in order for a Let's Split and Planck to share the same layout file, you need to use `LAYOUT_ortho_4x12` instead of `LAYOUT_planck_grid` or just `{}` for a C array. | ||
