Midi Triggers from any black or white key?

I'd like to trigger a macro by pressing any black key (or any white key) on a midi keyboard.

I could add 36 possible midi triggers, (and 52 white key midi triggers).
Is there a more elegant way than just adding midi triggers for every piano key?