]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - docs/feature_layouts.md
Clarify the format for layout names
[qmk_firmware.git] / docs / feature_layouts.md
index fcfe9cd1cf21adba7b5ff5952ef47f7511e124e0..bfae9204401833efb2f12762b1c95ce3ed3a0cd7 100644 (file)
@@ -1,6 +1,6 @@
 # Layouts: Using a Keymap with Multiple Keyboards
 
-The `layouts/` folder contains different physical key layouts that can apply to different keyboards. 
+The `layouts/` folder contains different physical key layouts that can apply to different keyboards.
 
 ```
 layouts/
@@ -21,7 +21,7 @@ layouts/
 | + ...
 ```
 
-The `layouts/default/` and `layouts/community/` are two examples of layout "repositories" - currently `default` will contain all of the information concerning the layout, and one default keymap named `default_<layout>`, for users to use as a reference. `community` contains all of the community keymaps, with the eventual goal of being split-off into a separate repo for users to clone into `layouts/`. QMK searches through all folders in `layouts/`, so it's possible to have multiple repositories here. 
+The `layouts/default/` and `layouts/community/` are two examples of layout "repositories" - currently `default` will contain all of the information concerning the layout, and one default keymap named `default_<layout>`, for users to use as a reference. `community` contains all of the community keymaps, with the eventual goal of being split-off into a separate repo for users to clone into `layouts/`. QMK searches through all folders in `layouts/`, so it's possible to have multiple repositories here.
 
 Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layout, in the most generic way possible, and contains a `readme.md` with the layout to be defined by the keyboard:
 
@@ -35,10 +35,12 @@ New names should try to stick to the standards set by existing layouts, and can
 
 ## Supporting a Layout
 
-For a keyboard to support a layout, the variable (`[a-z0-9_]`) must be defined in it's `<keyboard>.h`, and match the number of arguments/keys (and preferably the physical layout):
+For a keyboard to support a layout, the variable must be defined in it's `<keyboard>.h`, and match the number of arguments/keys (and preferably the physical layout):
 
     #define LAYOUT_60_ansi KEYMAP_ANSI
 
+The name of the layout must match this regex: `[a-z0-9_]+`
+
 The folder name must be added to the keyboard's `rules.mk`:
 
     LAYOUTS = 60_ansi