I would like to define a block of keys on a Fn layer translating to a macro that mashes three modifiers and then taps the qwerty layer’s underlying key. Since Macros has .col and .row, and I have the keymap definition, I thought I could do this in my macro handler:
(where keymaps is the global constant defined by the KEYMAPS macro in my .ino file). However, whenever I activate the macro, a keyboard event viewer shows the modifiers go down and up again, but the key isn’t getting tapped.
What am I doing wrong? Is it impossible to use .row/.col like this after all?
Thanks for clarifying! I dind’t know about PROGMEM, but that makes sense. Good to know about the Layer.getKey function too, that’s very interesting (:
I tried your code, and it works exactly as I hoped it would. I thought maybe I could use the macro form for it too, using Layer.getKey (no offense, but that handleKeyswitchEvent thing is very very verbose), and that fails exactly the way it did before - modifiers get pressed, but orig doesn’t get tapped:
I’ll stick with the non-macro form (putting the key definitions in the keymap), but curiosity demands I ask why the macro_t way doesn’t work the same way (:
Because macros are stored in PROGMEM (basically, read-only memory), and must be completely known at compile-time. However, orig is only known at runtime, so Tr(orig) will likely end up being Tr(Key_NoKey).