Can't get Modifier key to work with mouse press

Hi,

I'm trying to make a simple macro for Logic. First I press the letter T, which brings up a menu at the mouse pointer. Then I command-click on one of the menu items. But every time I run the macro, it acts as if it has done a normal click, not a command-click.

Here is what I have done so far:
Screenshot 2020-12-17 at 15.48.14

I have also tried pressing-and-holding the modifier as a separate action, and even putting in a pause after pressing the modifier. Whatever I do, it clicks the menu item, but does not command-click it.

What am I doing wrong?

tried adding a pause between the T and mouse?

Yes, I've tried adding a pause before the mouse, and between holding the modifier and clicking the mouse.

can you share a video or Gif of what the menu looks like and what you're trying to achieve?

If you don't have a screen capture app, Giphy is nice and free

Here's a Gif me doing the task manually. Pressing T makes the tool menu appear, then I command-click on the pencil tool. Notice the two tools at the top? When I command-click, you'll see that the right-hand one changes to a pencil (this indicates that whenever I hold command, my mouse pointer will change to a pencil).

Command Click Logic

What's happening with the macro is that the left-hand tool is changing, which is what happens when you normal-click the menu rather than command-clicking.

Dumb question, does KM have access to control Logic?
in OSX System Preferences > Security & Privacy > Privacy > Automation

Yes it does. I have other KM automations running in Logic without problems.

My best guess is that it's not playing ball because it's a contextual menu... I struggle with these sorts of things in Pro Tools.
As an alternative, could you not set your mouse click to the right-hand tool directly?