examples/Keyboardio/Atreus: Fix the QWERTY layer & macro mess

On the `Upper` layer we have a key that takes us back to the QWERTY layer. That
key appeared as `M(QWERTY)` on the keymap, while `QWERTY` was the layer name,
and `LAYER_QWERTY` was supposed to be the macro name. In the macro itself, we
used `Layer.move(LAYER_QWERTY)` - the macro name instead of the layer name.

In practice, this didn't matter, because both ended up resolving to `0`, but the
code did not reflect intention, and was confusing for anyone trying to
understand what's going on.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/872/head
Gergely Nagy 4 years ago
parent d76e32c367
commit ac8bc2d322
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -33,7 +33,7 @@
#define TG(n) LockLayer(n)
enum {
LAYER_QWERTY
MACRO_QWERTY
};
#define Key_Exclamation LSHIFT(Key_1)
@ -82,15 +82,15 @@ KEYMAPS(
[UPPER] = KEYMAP_STACKED
(
Key_Insert ,Key_Home ,Key_UpArrow ,Key_End ,Key_PageUp
,Key_Delete ,Key_LeftArrow ,Key_DownArrow ,Key_RightArrow ,Key_PageDown
,XXX ,Consumer_VolumeIncrement ,XXX ,XXX ,___ ,___
,M(QWERTY) ,Consumer_VolumeDecrement ,___ ,___ ,___ ,___
,Key_UpArrow ,Key_F7 ,Key_F8 ,Key_F9 ,Key_F10
,Key_DownArrow ,Key_F4 ,Key_F5 ,Key_F6 ,Key_F11
,___ ,XXX ,Key_F1 ,Key_F2 ,Key_F3 ,Key_F12
,___ ,___ ,M(QWERTY) ,Key_PrintScreen ,Key_ScrollLock ,Consumer_PlaySlashPause
Key_Insert ,Key_Home ,Key_UpArrow ,Key_End ,Key_PageUp
,Key_Delete ,Key_LeftArrow ,Key_DownArrow ,Key_RightArrow ,Key_PageDown
,XXX ,Consumer_VolumeIncrement ,XXX ,XXX ,___ ,___
,M(MACRO_QWERTY) ,Consumer_VolumeDecrement ,___ ,___ ,___ ,___
,Key_UpArrow ,Key_F7 ,Key_F8 ,Key_F9 ,Key_F10
,Key_DownArrow ,Key_F4 ,Key_F5 ,Key_F6 ,Key_F11
,___ ,XXX ,Key_F1 ,Key_F2 ,Key_F3 ,Key_F12
,___ ,___ ,M(MACRO_QWERTY) ,Key_PrintScreen ,Key_ScrollLock ,Consumer_PlaySlashPause
)
)
/* *INDENT-ON* */
@ -110,8 +110,8 @@ KALEIDOSCOPE_INIT_PLUGINS(
const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
switch (macroIndex) {
case QWERTY:
Layer.move(LAYER_QWERTY);
case MACRO_QWERTY:
Layer.move(QWERTY);
break;
default:
break;

Loading…
Cancel
Save