# Help learning new layouts

**URL:** <https://community.keyboard.io/t/help-learning-new-layouts/704>\
**Category:** Model 01 Layouts\
**Created:** [November 6, 2017, 4:22pm UTC](https://community.keyboard.io/t/help-learning-new-layouts/704 "2017-11-06T16:22:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![amos](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/amos/32/639_2.png) [@amos](https://community.keyboard.io/u/amos)\
**Post date:** [November 6, 2017, 4:22pm UTC](https://community.keyboard.io/t/help-learning-new-layouts/704/1 "2017-11-06T16:22:10Z")

</div>

I moved my numbers to the home row. I’ve been thinking of changing the original number keys to put out Marcos that print `number x is on the home row under ?`. I think this could help facilitate movements of keys for short term. I could use tap dance to add more than one action under the other keys if I still need them. Is there a way to add arguments to macros?

---

<div class="post-metadata">

**Author:** ![james.nvc](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/james.nvc/32/54_2.png) [@james.nvc](https://community.keyboard.io/u/james.nvc)\
**Post date:** [November 6, 2017, 4:30pm UTC](https://community.keyboard.io/t/help-learning-new-layouts/704/2 "2017-11-06T16:30:19Z")

</div>

If you use different numbers to identify the macros, it should be easy enough to do something like that…

```auto
enum { M_1, M_2, M_3, .... };

void printWarningMessage(uint8_t number) {
   // type "<number> is on the home row"
}

const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
    switch (macroIndex) {
     case M_1:
     case M_2:
     ....
     case M_0:
       printWarningMessage(macroIndex);
       break;
   }
}

// In the keymap,

   M(M_1), M(M_2), ....

```

---

<div class="post-metadata">

**Author:** ![amos](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/amos/32/639_2.png) [@amos](https://community.keyboard.io/u/amos)\
**Post date:** [November 6, 2017, 4:33pm UTC](https://community.keyboard.io/t/help-learning-new-layouts/704/3 "2017-11-06T16:33:53Z")

</div>

So no direct way to pass in arguments. Oh well, I will use this method then.

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [November 6, 2017, 4:36pm UTC](https://community.keyboard.io/t/help-learning-new-layouts/704/4 "2017-11-06T16:36:49Z")

</div>

Another thing you may consider (either instead or in addition to printing text) is to flash the wrong key in red, and the good one in green. A kind of visual cue for locating the correct key easier.

---

<div class="post-metadata">

**Author:** ![amos](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/amos/32/639_2.png) [@amos](https://community.keyboard.io/u/amos)\
**Post date:** [November 6, 2017, 4:51pm UTC](https://community.keyboard.io/t/help-learning-new-layouts/704/5 "2017-11-06T16:51:16Z")

</div>

I like the use of flashing the keys. Would you suggest using a macro to do the flashing or is there some better way? What is the best way to do the timing on the flash. Is there a timing that can be passed into an led effect or do I need to macros? One when I press the wrong key to change the colors and then one when I press the right key to change them back to my default theme?

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [November 6, 2017, 6:57pm UTC](https://community.keyboard.io/t/help-learning-new-layouts/704/6 "2017-11-06T18:57:46Z")

</div>

I think macros are the most straightforward here. You can do it with macros for the wrong keys only, at the cost of the flash persisting through its timeout, even if you press the right key before that.

You can do this because macro actions will be called even when there are no events on the key, in every scan cycle. This is precisely this way to allow implementing functionality that runs when the key is idle - such as timing out some animation!

[This example](https://community.keyboard.io/t/lock-layer-without-the-led/672/2?u=algernon) is somewhat similar, at least in spirit. Instead of setting all LEDs, you’d only set two: the wrong one and the bad one, and instead of setting all to black, you’d call `LEDControl.refreshAt()` for both keys, to reset them to whatever color the LED mode set them to. (And obviously, the layer changing code would be exchanged for the printing stuff.)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![amos](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/amos/32/639_2.png) [@amos](https://community.keyboard.io/u/amos)\
**Post date:** [November 7, 2017, 5:49pm UTC](https://community.keyboard.io/t/help-learning-new-layouts/704/7 "2017-11-07T17:49:59Z")

</div>

I’m having an issue with the helper lights staying on. If someone would like to take a look I’dl love some help.

> **[adkron/Model01-Firmware](https://github.com/adkron/Model01-Firmware/tree/error-lights)**
>
> The "standard" Keyboardio Model 01 Firmware sketch. - adkron/Model01-Firmware

---

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [November 7, 2017, 7:27pm UTC](https://community.keyboard.io/t/help-learning-new-layouts/704/8 "2017-11-07T19:27:11Z")

</div>

Gave you an inline comment, that should help a little (or so I hope). Let me know how it goes!

---

<div class="post-metadata">

**Author:** ![amos](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/amos/32/639_2.png) [@amos](https://community.keyboard.io/u/amos)\
**Post date:** [November 7, 2017, 9:05pm UTC](https://community.keyboard.io/t/help-learning-new-layouts/704/9 "2017-11-07T21:05:17Z")

</div>

Thanks, for the help. I got it to work, but I don’t quite understand. I commented back. I also pushed the change to them master branch if you want to see what I did. I welcome any suggestions on what is a better way.
