CAG not working

I have a conditional activation group for trying to make the "return" and "backspace" keys do what they do on Windows. It used to work (mostly). Now it doesn't work at all.

The conditions are:
appName == "Finder" AND focusedElementRole != "AXTextField"

The conditions show us "Currently true" in situations when I expect them to be true, and not otherwise.

But no triggers within the CAG do anything. Specifically, even a simple trigger to map "return" onto command-O does nothing. (Actually, it needs to be a bit more complicated than this to avoid interfering with Spotlight, but even the simple version doesn't work anymore.)

I have installed the latest alpha version (5.308) and restarted my system. I'm on a MacBook Air M3 OS 15.3.2.

Thanks for your help.

best go to help -> export diagnostic debug information and send the result to me (andreas@folivora.ai), then I can check

Does it work if you remove focusedElementRole != "AXTextField"?

Thanks very much. I have sent you the debug files.

It also does not work if I remove focusedElementRole != "AXTextField".

ah the issue is you have this option enabled: "Always use old keyboard shortcut implementation". Is there a reason for that? It really should only be used in very specific cases where all other options fail.

However it's also a bug as this should really work with the old implementation as well. It should be fixed in 5.309 alpha (uploading now)

Hi Andreas,

Thanks for looking into this problem!

First, I updated to 5.315, and it seems to still not work at all if I have "use old keyboard shortcut implementation" checked.

I don't remember why I checked that, there was probably a reason. But I'm unchecking it for now.

With that option unchecked, it mostly works. However, it's a bit inconsistent. In particular, the "backspace --> cmd-up-arrow" shortcut works only sometimes (even though the conditions always show up correct true/false as expected). I haven't noticed the other shortcuts failing. I saved out debug info at a time when the backspace shortcut was not working, and emailed it to you. It seems to come and go. I don't know what conditions cause it to sometimes work and sometimes not.

Thanks again.

the rest is most likely a condition problem. It is very tricky to get this work consistently and it will definitely need more conditions for all the edge cases. I think I had posted a more reliable example a few months ago, I‘ll check whether I can find it!

I'm not so sure! For one thing, it goes between working and not working, and back again, without anything in the environment seeming to have changed. And the times that it fails to work, the conditions show in BTT as being met...

it's complicated. The condition viewer does poll the AX attributes manually and doesn't rely on notifications by the app, which can sometimes lead to slightly different behavior in the viewer than in the real app. In real usage you usually don't want to poll because it costs quite a bit of CPU. Maybe I can add a non-polling mode to the viewer, that might make setting this stuff up easier.

There are also many edge cases related to the AXAttributes. For example a selected file is usually not a AXTextField, but when you click on its name it becomes a AXTextField.

Thank you for your replies and your help with this. At least it is mostly working now. I still don't understand why it sometimes doesn't work, but I guess that's okay.