Running a macro when MIDI & hot key are pressed together

Hi folks. I’m new to Keyboard Maestro and really impressed so far. I’ve run into something that I’d love to try doing, not sure if it’s possible.

I’m using Metagrid on my iPad to trigger KM macros and control Digital Performer. The one I’m on now is the Transpose MIDI menu. I’ve built a scene in Metagrid that has all my intervals in it, and I’ve assigned them to send a MIDI CC message that triggers the correct macro for transposing up in pitch. If it’s possible, I’d like to try having a modifier key, so if I hit my button for a perfect 5th in Metagrid and it sends out the CC message it’ll transpose up, but if I hit that button while holding the Shift key on my Mac it’d trigger a different macro and transpose it down a 5th instead. It’s mostly in the interest of having less buttons on screen in Metagrid, I can obviously program a separate keypad for the transpose down commands.

So is there a way to require two conditions to be the case for this situation? I’ve been trying to use the If-Then-Else, where if the Shift key is pressed it inserts the value for an up transposition, otherwise it inserts the down value. It works fine within KM if I run it from the toolbar, but if I try it from the iPad in Metagrid the Shift key doesn’t affect it.

It seems like something that should be possible, and in a week or two it all may be a moot point with the Metagrid update promising modifier keys within it, but in the meantime if there’s a smart way of making this work that’d be awesome.

Thanks!

You can't have "and" triggers, no. Triggers are events, so "anding" them does not make sense.

The correct answer is to use the If Then Else action with the Modifiers condition to test the Shift state.

However you imply that does not work - is the Shift key you are pressing on the Mac keyboard? It wont work to use the Shift key on the iPad or on a keyboard attached to the iPad.

Hi Peter, thanks for the reply. I'll play around with the If Then Else action and see if I can make it happen. I was holding Shift on my Mac, then hitting the Metagrid button to send the MIDI message, it also might be a matter of playing with the order of actions. Or maybe a clever use of defining a variable from the Shift key, then the If Then Else? Some more experimentation is in order on a fresh brain.

I've attached a screen shot here to show what I've done. Cmd-9 is the Transpose command, the Move & Click below it selects the correct Transpose setting. The four Tab hits get me to my Transpose From field, and sets C3 as the From note. The next tab gets me to the Transpose To field, where (in theory) if I've got Shift pressed it'll transpose up to C#3, if not it'll transpose down to B2.

Thanks for the help!