How to: Shortcut for app in background ▸ 1) Only for app X ▸ 2) Only if app X is on

I would want a certain shortcut keys to be able to work for a specific app.

  1. The app should be controlled while in the background.
  2. I want the shortcuts work only if the app is active.

Thanks a lot

Take a look at the "If Then Else" action.

Macro Groups control when macros are active. Macro Groups can be active when a specific application is at the front, but not only when an application is running, or running and not in the front. So the macro will need to be active all the time (and thus the hot key will be active all the time).

For the most part, you cannot control an application while its in the background except via AppleScript. Keyboard Maestro can do things like selecting a menu, but its done by bringing the app to the front, and then selecting the menu, and then sending it back to the background.

Generally, “active” means the application is at the front, so I’m not sure what you mean by “work only if the app is active”.

1 Like