Are there docs on key states, keyToggledOn, key_is_pressed, key_toggled_off anywhere?

My testing indicates that this is true if the macro is a single key, but not if the macro contains multiple keys.

For demonstration purposes, I’ve taken the default firmware (at commit 11676727) and made just a single change:

diff --git a/Model01-Firmware.ino b/Model01-Firmware.ino
index bc45ee3..6a182e0 100644
--- a/Model01-Firmware.ino
+++ b/Model01-Firmware.ino
@@ -236,7 +236,8 @@ const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) {
     break;

   case MACRO_ANY:
-    anyKeyMacro(keyState);
+    if (keyIsPressed(keyState))
+      return MACRO(D(A));
     break;
   }
   return MACRO_NONE;

This works as expected. I’m on a Mac running Key Codes to inspect keyboard inputs, and pressing the any key works identically to pressing the A key: I see a Key Down event, then a brief pause, then Key Down (Repeat) events, and finally (when I release the key) a Key Up event. I would also add that the Key Down (Repeat) events are on the order of magnitude of 10 per second.

Let’s instead change this macro to: return MACRO(D(A), D(B));. Now I get something completely different: A Key Down event for A when I first press any, and a Key Up event for A when I release any, but in the interim, I’m getting alternating Key Down and Key Up events for B on the order of magnitude of 100 per second or more – likely, one per scan cycle.

Now admittedly this is a contrived example, but modifier + key is significantly less contrived. If I repeat this experiment with: return MACRO(D(LeftGui), D(A)); then I get a Modifier Change event when I press and release the any button, and then Key Down/Up events for A every cycle. And likewise, if I try return MACRO(D(A), D(LeftGui)); then I get Key Down/Up for A when I press and release the any button, and two Modifier Change events every cycle.

What I’m ultimately trying to build at the moment is a macro that maps Ctrl+Tab to a certain combination of keys. (And then next I’m going to work on Cmd+Tab, but that’s significantly more complicated for several reasons, so I’m starting with Ctrl+Tab. And yes, I’ve already read the code examples for Cmd/Alt+Tab both here and here.)

Let’s use Chrome on my Mac as an example. When I press and hold Ctrl+Tab using the native keyboard, Chrome will switch to the next tab, pause momentarily, and then start to rapidly advance tabs repeatedly. When I look at the Key Codes app, this first tab switch corresponds to the initial Key Down event, and then the later (rapid) tab switches correspond to the approximately ~10 per second Key Down (Repeat) events. I’m not sure what layer (eg, I’m not even sure if it’s hardware or software) is responsible for generating these Key Down (Repeat) events – but whatever it is, I can’t seem to get that to happen when using Kaleidoscope macros with multiple keys.