BTT incorrectly detects app for popup windows

When I call any popup window (like RayCast or iTerm2 hotkey window) BTT continues to use bindings for application which was active before popup.

For example, I have application for which I map 'Enter' to 'V'. Open that application, then call RayCast with shortcut. RayCast window appears and I can't use 'Enter' in it because it is mapped to 'V'.

Device information:

  • Type of Mac: MacBook Pro 16" 2019
  • macOS version: Ventura 13.6
  • BetterTouchTool version: 4.017 (2232)

this is not a bug, such windows do usually not change the active app. (this is intentional, they don’t want the other app to loose keyboard focus. Some of them have special modes to do that though )

However often you can use conditional activation groups in BTT to match such windows.
Have a look at the various options described in this thread:

Nice! But, if I understand correctly, I have to tune Conditional Activation Group for all shortcuts in all applications, which is lots of work! Seems like global exclusion condition would be much better.

I think you are thinking about „advanced trigger conditions“ - these would be per trigger. Conditional activation groups instead act globally (you can also make global exclusion lists using them): Trigger Conditions & Conditional Activation Groups · GitBook

I just tried it and Conditional Activation Groups don't seem to have "visible_window_list" condition (which works in advanced trigger conditions) and "Window Name" don't detect opening RayCast window.

:cry: usually window name is the best option. If raycast doesn’t have a window name this won’t work though.

However I think I can add one more condition to the CAGs that can match the focused accessibility element‘s app. This should help, I’ll look into that tomorrow.

I'm fighting the same issue. I wanted to make the "enter" key to open files in Finder instead of renaming them, but hit the "Raycast" problem.
First I tried the 'visible_window_list' solution, but since I find it not precise enough, I settled for :

NOT (focused_element_details CONTAINS "Raycast")

This was good enough on paper, but it turns out - not in practice. For some reason, with this condition, the shortcut does not fire when Raycast is focused, BUT also Raycast does NOT fire it's own default action.

My guess is BTT conditions are not functioning very naturally and instead of passing through a key stroke when a condition is not met, BTT consumes and kills it. This is not nice at all mildly said.
A workaround it to create an "enter" -> "enter" mapping with the reverse condition (so when Raycast IS focused), but I rather say BTT must fix this or at least add an option for the user to choose if the keystroke should be passed through or not when conditions are not met (or is it present already and I'm missing something ?).

Btw 'focused_windows_app_name' is not working for Raycast, you must use 'focused_element_details' in order this to work.

@joro_abv yes this is how advanced trigger conditions work. They are evaluated after the trigger has been caught by BTT, so if you want the default behavior you need to configure it to re-trigger it (like you described enter -> enter). See Trigger Conditions & Conditional Activation Groups · GitBook

This makes it possible to have such advanced trigger conditions without impacting macOS performance. An automatic pass through option would be nice but is hard to implement (and might not even be possible for some events).

1 Like