Triggers on specifc applications in Keyboard Maestro
Create a Macro Group (File → New Macro Group or ⌘⇧N).
Set the Macro Group to only be available in certain applications:



Drag macros to the macro group.