-#| Convert the .ELF into a .HEX to load onto the Teensy
-set( TARGET_HEX ${TARGET}.hex )
-add_custom_command( TARGET ${TARGET_ELF} POST_BUILD
- COMMAND ${OBJCOPY} ${HEX_FLAGS} ${TARGET_ELF} ${TARGET_HEX}
- COMMENT "Creating load file for Flash: ${TARGET_HEX}"
-)
+#| Do not include the .kll extension
+#| * BaseMap maps the native keyboard scan codes to USB Codes so the layout is compatible with all other layouts
+#| * DefaultMap allows the default keymap to be modified from the BaseMap
+#| * PartialMaps is a set of dynamically set layers (there is no limit, but too many may use up too much RAM...)
+#| BaseMap generally does not need to be changed from "defaultMap"
+#|
+#| Syntax:
+#| myMap
+#| * defines a single .kll layout file, double-quotes are needed to distinguish between layers
+#| "myMap specialLayer"
+#| * defines myMap to be the main layout, then replace specialLayers on top of it
+#|
+#| - Only for PartialMaps -
+#| "myMap specialLayer" "myMap colemak" dvorak
+#| * As before, but also generates a second layer at index 2 and third at index 3
+#|
+#| NOTE: Remember to add key(s) to enable each Partial Layer
+#| NOTE2: Layers are always based up the BaseMap (which should be an ANSI-like mapping)
+#| NOTE3: Compiler looks in kll/layouts and the build directory for layout files (precedence on build directory)
+
+##| Set the base keyboard .kll map, defaults to "defaultMap" if not found
+##| Looks in Scan/<Module Name> for the available BaseMaps
+set( BaseMap "defaultMap"
+ CACHE STRING "KLL BaseMap/Scancode Keymapping" )
+
+##| Layer additonal .kll maps on the BaseMap, layers are in order from 1st to nth
+##| Can be set to ""
+set( DefaultMap "md1Overlay stdFuncMap"
+ CACHE STRING "KLL DefaultMap" )
+
+##| ParitalMaps available on top of the BaseMap. See above for syntax on specifying multiple layers vs. layering
+##| Can be set to ""
+set( PartialMaps "hhkbpro2"
+ CACHE STRING "KLL PartialMaps/Layer Definitions" )