Real-world Macros

I’m working on a major redesign of the Macros plugin (among others) that should make it more straightforward and accessible to use, but which has some potential backwards-incompatibility. I’d like to collect examples of people’s current Macros to better anticipate the problems that might arise, and to help write a guide to upgrading the code. If you’ve got any Macros function(s) that you’re willing to share, please let me know. Even a general description of non-obvious use cases would be helpful.

Thanks in advance!

1 Like

Hello @merlin

I use both Macros.type and the regular MACRO with examples below.

case FULLSCREEN: if (keyToggledOn(key_state)) { return MACRO(D(LeftGui),D(LeftControl),T(F),U(LeftControl),U(LeftGui));}; break ; // fullscreen osx

case USR: if (keyToggledOn(key_state)) { return Macros.type(PSTR(“DUMMY”));} break;

1 Like

Just so you know, you don’t need a macro to do this; merely putting LCTRL(LGUI(Key_F)) in your keymap gives you the same result.

I was sure I did this for a reason as I am aware of the other way : Macro String being UpperCased Unintentionally (Arduino Boards Update)

I think the issue was resolved long ago, but I also remember having some timing issues in the past. I found that when using macros for shortcuts this way was more consistent. From memory it was for my tmux shortcuts ( I use backtick over the default Ctrl-B ).