# Increase Number of layers

**URL:** <https://community.keyboard.io/t/increase-number-of-layers/3806>\
**Category:** Programming\
**Created:** [April 23, 2020, 9:50am UTC](https://community.keyboard.io/t/increase-number-of-layers/3806 "2020-04-23T09:50:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zagdul](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/zagdul/32/3278_2.png) [@zagdul](https://community.keyboard.io/u/zagdul)\
**Post date:** [April 23, 2020, 9:50am UTC](https://community.keyboard.io/t/increase-number-of-layers/3806/1 "2020-04-23T09:50:59Z")

</div>

Hi,

I am fairly new to the Keyboardio Model 01 and i am now getting used to it. I got it to flash a custom firmware and so far most things are working. Just some minor questions left:

- It seems like I need probably around 6 to 7 layers to get everything mapped, as I want it to. Problem being: as soon as I add the 6th layer, it won’t compile… I remember something about 5 layers in chrysalis or so… any Idea on how I can change that
- I did not find a way yet to map a led “layout” to a certain layer…
- or to stack different LED-features (have all keys light up in dark blue, but have the Stalker Plugin on top or something), if that is possible at all.

maybe I did miss something when researching the wiki and the community board here… but I did not find answers to those questions yet.

---

<div class="post-metadata">

**Author:** ![alfalfasprossen](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/alfalfasprossen/32/2101_2.png) [@alfalfasprossen](https://community.keyboard.io/u/alfalfasprossen)\
**Post date:** [April 23, 2020, 2:58pm UTC](https://community.keyboard.io/t/increase-number-of-layers/3806/2 "2020-04-23T14:58:57Z")

</div>

1. Seven layers should be no problem. I think there is a practical limit to the number of layers at the moment but it surely is much higher than seven. You will have to check the error message you get for details. Maybe it’s just a typo somewhere.

2. Try the colormap plugin [https://github.com/keyboardio/Kaleidoscope/blob/master/docs/plugins/Colormap.md](https://github.com/keyboardio/Kaleidoscope/blob/master/docs/plugins/Colormap.md)

3. I guess you would have to write a custom stalker led theme for a different base color 🤔 I don’t think there is out-of-the-box support for combining themes.

---

<div class="post-metadata">

**Author:** ![zagdul](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/zagdul/32/3278_2.png) [@zagdul](https://community.keyboard.io/u/zagdul)\
**Post date:** [April 23, 2020, 3:37pm UTC](https://community.keyboard.io/t/increase-number-of-layers/3806/3 "2020-04-23T15:37:57Z")

</div>

1. for whatever reason, as soon as i add the 6th layer, i get a compile error. Even if i copy an already existing and compiling one.
2. thanks for the hint.
3. cool. Seem like i have a new project coming up 😉

---

<div class="post-metadata">

**Author:** ![fire](https://avatars.discourse-cdn.com/v4/letter/f/67e7ee/32.png) [@fire](https://community.keyboard.io/u/fire)\
**Post date:** [April 23, 2020, 6:01pm UTC](https://community.keyboard.io/t/increase-number-of-layers/3806/4 "2020-04-23T18:01:02Z")

</div>

Can you post the error you get?

I’m also really curious about your 7 layer map!

---

<div class="post-metadata">

**Author:** ![zagdul](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/zagdul/32/3278_2.png) [@zagdul](https://community.keyboard.io/u/zagdul)\
**Post date:** [April 23, 2020, 7:00pm UTC](https://community.keyboard.io/t/increase-number-of-layers/3806/5 "2020-04-23T19:00:40Z")

</div>

right now, i am only at 6 layers…  
not sure i I need all of it, but when experimenting I hit that wall:

```
Arduino: 1.8.12 (Mac OS X), Board: "Keyboardio Model 01"

```

> In file included from /Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/Kaleidoscope.h:58:0,  
> from /Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/Kaleidoscope.h:19,  
> from /Users/stephan/Documents/Arduino/Model01-Firmware-Test1/Model01-Firmware-Test1.ino:17:  
> /Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/layers.h:28:60: sorry, unimplemented: non-trivial designated initializers not supported  
> const Key keymaps\_linear[ROWS_COLS] PROGMEM = { layers }; **NL**   
> ^  
> /Users/stephan/Documents/Arduino/Model01-Firmware-Test1/Model01-Firmware-Test1.ino:176:1: note: in expansion of macro ‘KEYMAPS’  
> KEYMAPS(  
> ^ ~~~~~~  
> /Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/layers.h:28:60: sorry, unimplemented: non-trivial designated initializers not supported  
> const Key keymaps\_linear[][ROWS_COLS] PROGMEM = { layers }; **NL**   
> ^  
> /Users/stephan/Documents/Arduino/Model01-Firmware-Test1/Model01-Firmware-Test1.ino:176:1: note: in expansion of macro ‘KEYMAPS’  
> KEYMAPS(  
> ^ ~~~~~~  
> exit status 1

---

<div class="post-metadata">

**Author:** ![zagdul](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/zagdul/32/3278_2.png) [@zagdul](https://community.keyboard.io/u/zagdul)\
**Post date:** [April 23, 2020, 7:05pm UTC](https://community.keyboard.io/t/increase-number-of-layers/3806/6 "2020-04-23T19:05:41Z")

</div>

oh boy… i found my fault: the order in which the layouts are defined has to match the order of the enum… when copying i mixed that up it seems…

but just for those interested, this is my current list of layouts:

```
KEYMAPS(

 [PRIMARY] = KEYMAP_STACKED
  (Key_Escape, Key_1, Key_2, Key_3, Key_4, Key_5, LT(NUMPAD,LEDEffectNext),
   Key_Tab, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Meh,
   ShiftToLayer(SPECIAL), Key_A, Key_S, Key_D, Key_F, Key_G,
   Key_LeftShift, CTL_T(Z), Key_X, Key_C, Key_V, Key_B, LT(NUMPAD,Equals),
   Key_Backspace, Key_Delete, Key_LeftGui, Key_LeftAlt,
   ShiftToLayer(FUNCTION),

   LockLayer(XOY), Key_6, Key_7, Key_8, Key_9, Key_0, Key_Minus,
   Key_Hyper, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_LeftBracket,
                                      Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote,
   Key_Backslash, Key_N, Key_M, Key_Comma, Key_Period, MT(RightControl,Slash), MT(RightShift,RightBracket),
   Key_RightAlt, Key_RightGui, Key_Enter, Key_Space,
   ShiftToLayer(FUNCTION)),

  [NUMPAD] = KEYMAP_STACKED
  ( ___,___ , ___,___ , ___,___ , M(MACRO_VERSION_INFO),
   ___,___ , ___,___ , ___,___ , ___,
   ___,___ , ___,___ , ___,___ ,
   ___,___ , ___,___ , ___,___ , ___,
   ___,___ , ___,___ ,
   ___,

   ___,___ , Key_7, Key_8, Key_9, Key_KeypadSubtract, ___,
   ___,___ , Key_4, Key_5, Key_6, Key_KeypadAdd, ___,
                           ___, Key_1, Key_2, Key_3, Key_Equals,___ ,
   ___,___ , Key_0, Key_Period, Key_KeypadMultiply, Key_KeypadDivide, Key_Enter,
   ___,___ , ___,___ ,
   ___),

 [SPECIAL] = KEYMAP_STACKED
  ( ___,___ , ___,___ , ___,___ , ___,
   ___,___ , ___,___ , ___,___ , ___,
   ___,___ , ___,___ , ___,___ ,
   ___,___ , ___,___ , ___,___ , ___,
   ___,___ , ___,___ ,
   ___,

   M(MACRO_VERSION_INFO), ___,___ , ___,___ , ___,___ ,
   ___, LALT(Key_7), LALT(Key_5), LALT(Key_6), LALT(LSHIFT(Key_6)), LALT(LSHIFT(Key_Equals)),___,
                          LSHIFT(Key_7), LSHIFT(Key_8), LSHIFT(Key_9), LALT(Key_8), LALT(Key_9), ___, 
   ___, LALT(LSHIFT(Key_7)), Key_Backtick, LSHIFT(Key_Backtick),___, ___,___ , 
   ___,___ , ___,___ ,
   ___),

   
[XOY] = KEYMAP_STACKED
  ( ___,___ , ___,___ , ___,___ , ___,
   ___, Key_X, Key_Comma, Key_O, Key_Period, Key_Z,___ ,
   ___, Key_H, Key_A, Key_E, Key_I, Key_U,
   ___, CTL_T(K), Key_Q, Key_Quote, Key_LeftBracket, Key_Semicolon,___,
   ___,___ , ___,___ ,
   ___,

   M(MACRO_VERSION_INFO), ___,___ , ___,___ , ___,___ ,
   ___, Key_V, Key_G, Key_C, Key_L, Key_J, Key_Minus,
                          Key_D, Key_T, Key_R, Key_N, Key_S, ALT_T(F), 
   ___, Key_B, Key_P, Key_W, Key_M, CTL_T(Y),___, 
   ___,___ , ___,___ ,
   ___),

 [MCS] = KEYMAP_STACKED
  ( ___,___ , ___,___ , ___,___ , ___,
   ___,___ , ___,___ , ___,___ , ___,
   ___,___ , ___,___ , ___,___ ,
   ___,___ , ___,___ , ___,___ , ___,
   ___,___ , ___,___ ,
   ___,

   M(MACRO_VERSION_INFO), ___,___ , ___,___ , ___,___ ,
   ___, LALT(Key_7), LALT(Key_5), LALT(Key_6), LALT(LSHIFT(Key_6)), LALT(LSHIFT(Key_Equals)),___,
                          LSHIFT(Key_7), LSHIFT(Key_8), LSHIFT(Key_9), LALT(Key_8), LALT(Key_9), ___, 
   ___, LALT(LSHIFT(Key_7)), Key_Backtick, LSHIFT(Key_Backtick),___, ___,___ , 
   ___,___ , ___,___ ,
   ___),
  [FUNCTION] = KEYMAP_STACKED
  (___, Key_F1, Key_F2, Key_F3, Key_F4, Key_F5, Consumer_Mute,
   Key_Tab, ___,___ , ___,___ , ___, Consumer_VolumeIncrement,
   ___,___ , ___,___ , ___,___ ,
   ___, Key_PrintScreen, Key_Insert,___ , ___,___ , Consumer_VolumeDecrement,
   ___, Key_Delete,___ , ___,
   ___,

   Consumer_PlaySlashPause, Key_F6, Key_F7, Key_F8, Key_F9, Key_F10, Key_F11,
   Consumer_ScanPreviousTrack, ___, Key_PageUp, Key_UpArrow, Key_PageDown,___ , Key_F12,
                                  Key_Home, Key_LeftArrow, Key_DownArrow, Key_RightArrow, Key_End, ___,
   Consumer_ScanNextTrack, ___,___ , ___,___ , ___,___ ,
   ___,___ , Key_Enter, ___,
   ___)
) // KEYMAPS(
```
