Getting started with macros/key combinations

I’ve successfully flashed my firmware following the Kaleidoscope wiki directions, but I feel like I’m missing something: I’d like to, for instance, be able to press any+c (so the “any” key, plus the “c” key), and have that send ctrl+alt+space to my operating system.

I get the sense that a macro is the way to do this, but after searching for a while and reading documentation I haven’t been able to find an example of how to set this up in my firmware.

I see where the MACRO_ANY is defined, but it’s called with a single keypress by default (the “any” key). I’m wondering how to create a macro triggered by a combination of keys.

If anyone can point me in the right direction I’d be very grateful.

1 Like

You want the MagicCombo plugin for this!

Thanks, that looks exactly like what I need!

I’ve been tinkering with this, and the only thing I can’t figure out is how to execute a macro from within a magic combo. I’ve tried putting

Macros.play(MACRO_CALENDAR);

in the body of my magic combo function, but that doesn’t seem to work. I also tried putting the macro execution itself directly in the magic combo function, like so:

MACRO(D(LeftControl), D(LeftAlt), D(Spacebar), U(LeftControl), U(LeftAlt), U(Spacebar));

But no luck with that either.

Is there any documentation on how to execute a macro from within a magic combo function?

I got it working!

Turns out the key is in how Macros.play() is called. I was trying to use a named macro, but it should be like e.g.:

MACRO(D(LeftControl), D(LeftAlt), D(Spacebar), U(LeftControl), U(LeftAlt), U(Spacebar));
3 Likes