Macro Not Triggering on Audio Output Change

Hello,

I hope I'm at the right address with this issue here, but I was wondering if the 'audio output device changes' trigger is working for other people?

I'm trying to write a simple macro using that trigger and an applescript that starts a specific application based on which output is active, but it seems that KM doesn't trigger when said change happens... I tried to confirm it's the trigger that is the issue, not my script, by having just a keyboard maestro alert pop-up as soon as the trigger is fired, but this also never shows (nor does it register in the debugging screen), even if I switch the output source manually in the system preferences.

I'm running a MacBook Pro 2018 with Mojave 10.14.2 and wondering if others can reproduce this issue or if it's just me?

What devices are you changing from/to? Mainly it currently just detects changing the data source (ie, from headphones to internal speakers). I have enhanced it for the next version to detect more devices/changes.

1 Like

Hi,

That's actually exactly what I was trying to do (speakers to headphone and back). Whether it is by physically attaching/detaching my headphones the mini-jack or using a program like Rogue Amoeba's SoundSource, the change in output device just never seems to trigger KM.

Well, hopefully the enhancements will detect the change in the next version, if not let me know and I will take a look - the API for this stuff is arcane beyond comprehension.

1 Like

Would also love to make a macro with this feature working :slight_smile:.

Working for me !

Keyboard Maestro v8.2.4

What kind of connection is it? Generally it will currently only work with the actual headphone selection. The next version of Keyboard Maestro may have more ability to detect changes.

When I plug my headphone in, the macro is executed. :+1:

1 Like

Can happily report that KM 9 now correctly triggers macros when the audio output changes on my 2018 Macbook pro! Worth the upgrade cost for that alone in my case :grin::+1:

Great to hear - it's always a bit tricky with things like this where I have limited hardware to test it with.