Interfacing with specific application

I’m trying to figure out how to migrate my existing Better Touch Tool action into KM. (I have lots of them).
Some are easy how to replicate.
Some are easy to see how they can be better now.
and a couple confound me.

One in particular is this:

I have a 12 button mouse. I use Skype as my phone much of the day. Skype is not always the front or active application though. In BTT I had one button set to send a shortcut for answer call to the skype app. and one to hang up. It didn’t matter if the application was front or active, they had an action that was “Send shortcut to specific App”

Is there a way to do that?

It should be possible using the USB Device Key trigger.
See:

trigger:USB Device Key [Keyboard Maestro Wiki]

You cannot send a keystroke to a specific application in Keyboard Maestro currently.

Perhaps you can use AppleScript or JXA to do it, I’m not sure. JXA should be able to I’d guess.

Looks like people have found a way to do this using AppleScript, though it was a few years ago and since I’m not a Skype user I have no way of testing.

https://superuser.com/questions/529399/skype-is-there-a-keyboard-shortcut-to-answer-a-call

You can communicate with an app in either AppleScript or JXA without activating it (making it frontmost), UNLESS it us UI scripting.

So, a KM macro could execute an AppleScript to . . .