Macros trigger while typing in Raycast pop-up

Hi all,

I’ve run into an odd problem with my Pro Tools macro group and Raycast.

  • Setup:
    • macOS 14.4, Keyboard Maestro 11.0.3
    • Macro group: available in Pro Tools, restricted to windows with titles containing “Edit:”
    • I also use Raycast (launcher, Spotlight-like).
  • Problem:
    When I bring up the Raycast panel and start typing in its search field, some of my Keyboard Maestro macros still trigger. It feels like KM doesn’t recognise that I’m in a text field in Raycast, so it keeps interpreting my keystrokes as hotkeys.
  • Expected:
    While the Raycast pop-up is open and focused, I’d like KM to not fire my Pro Tools macros — I just want to type in Raycast without triggering anything.
  • What I’ve tried:
    • Limiting the macro group to Pro Tools windows with “Edit:” in the title (doesn’t help, macros still fire).
    • Excluding Raycast from the group (but Raycast never becomes the “front application” when its panel is open, so KM doesn’t see it as frontmost).
    • Checking Secure Input status — that’s not the issue here.

Question:
Is there a recommended way to stop KM macros from firing while typing into apps like Raycast that don’t take frontmost-app status, but do grab keyboard focus? Should I be using “Focused field is a text field” conditions, or is there a cleaner group-level solution?

Thanks in advance — any tips appreciated!

This is a common problem with apps that don't use real macOS windows. KM can detect this sort of thing using a variety of different tools.

One way to fix this is to modify your macros to check if the Raycast window is on the screen, using the KM Find Image action. If the Recast window is open, the macro should stop.

Another way to fix this is to manually check if there are any differences in the list of processes when the Raycast window is up. If there are differences, your macro can detect the difference and stop. When I solve problems this way, it makes me feel extremely satisfied.

Another way to fix this is to have your macros use OCR to see if the Raycast window is open.

I don't have Raycast so I can't see what it looks like when it's open. If you can show me an image of what it looks like, I may be able to give better help.

Personally, what I would do in a case like this is create a macro that checks once per second if the Raycast window is open. If it is open it would set a global variable called "RaycastOpen" to 1, and set it to 0 if the window is not open. In that case, all your macros have to do is check if that variable is open, and exit if it is. You could insert this at the top of each of your macros: