Leader unable to distuinguish A from AA sequences

I am unable to get one of the code examples given for Leader to work correctly. The code example from: Keystrokes/Leader/Leader.ino — Kaleidoscope documentation leads me to think that Leader emulation of Tap Dance is possible, along with Leader sequences such as C, CA, CC, CCX all possible. According to the code example:

static void leaderTestA(uint8_t seq_index) {
serial_port.println(F(“leaderTestA”));
}

static void leaderTestAA(uint8_t seq_index) {
serial_port.println(F(“leaderTestAA”));
}

static const kaleidoscope::plugin::Leader::dictionary_t leader_dictionary PROGMEM =
LEADER_DICT({LEADER_SEQ(LEAD(0), Key_A), leaderTestA},
{LEADER_SEQ(LEAD(0), Key_A, Key_A), leaderTestAA});

both A and AA should be recognized but when I try this example only the A sequence works since there does not seem to be a timer telling the program to wait to see if there is another matching sequence in the dictionary.

I am trying to port my Key Maps over from QMK and this is one of the most used features for me. How do I make this function work correctly?

I don’t have the resources to look into this right now, but if you could file an issue against Kaleidoscope, then it won’t fall of my radar, and I’ll take a look as soon as I can. This definitely sounds like a bug, Leader should support A and AA sequences.

Mind you, the intended effect is that if there are both an A and an AA sequence, then tapping LEAD A A would perform both, not just AA, unless the A action calls Leader.reset().

The results that I am getting seem to be the same results as if I had called Leader.reset() with action A.
If I understand your last sentence, I can have action A, or action A and action AA, but never just action AA. I am at a loss as to how that would be useful.

Correct.

It’s not that it would be useful. It’s about being easier to implement, and so far, not needing to do better. I’m certainly open to improving Leader, and making it possible to have an A and AA sequence, and have the latter not trigger the first. Can you file an issue against Kaleidoscope on GitHub? That’d help me not loose track of it.