"Application Deactivate" Trigger

Is there a way to use the deactivation of a program as a trigger for a hotkey action that takes effect actually in that program. In this instance I want to switch something on when activating the program and off when deactivating with a key combination that works inside the program.

Howdy, welcome to the forum! As you might have already figured out, this is a great community full of people who love to help.

There is indeed a "deactivation trigger", but I foresee and issue using it and then sending a command to that app that just deactivated. For example, if you wanted to use the select a menu item action, this is accomplished by briefly recalling the application if it's not already at the front and then switching back to the first app... which means it would activate, then deactivate, which would trigger the macro again, causing it to loop endlessly. You could use a semaphore lock/pause combo to prevent this from happening, but that's a bandaid solution at best.

If you were able to provide more info we could help some more. For instance, what app are you working with? What is the action you want to perform in/on said app? If you can supply that info we could probably help point you in the right direction.


Thanks you for the quick reply. Here is what I want to do:

I am using steinberg nuendo for film post mixing. It has a video feed to an external video card. I want this video feed to get cut when switching out of the application which isn't able to do so by itself. But there is a shortcut to switch off the video which is better than nothing. So when activating the app switching on the video is fine, but when cmd-tabbing out it doesn't work.

It's a simple enough key combination: alt+cmd+v

I'm assuming (because it's been a very long time since I've used Windows or a Windows based keyboard) that alt is the option ⌥ key?

This is what I would try to get started... a keystroke action... selecting the appropriate app in the dropdown menu to send the hotkey directly to said app:

Action Screenshot (click to expand/collapse)

1 Like

Option it is, I’m on mac

Oooh, I didn’t know I could do this. Amazing. Will try tomorrow. :smile:

First thing that springs to mind is to use cmd-tab, cmd-h (and any other trigger that will switch focus away from Nuendo) to trigger your macro. The macro will 'eat' that keypress, leaving you to perform an action before simulating the same keypress again.

Nuendo - Cut Video Feed on Switch Away.kmmacros (24 KB)

Macro screenshot

Awesome, that totally works. Thank you. I just had to make sure to take the macro out of the nuendo-specific folder and put it into the general one.

1 Like