Keyboard shortcuts active only if no text fields active?

Is it possible to setup keyboard shortcuts which are only active when no text fields are active?

I'd like to use the unmodified comma and period keys (< >) to switch tabs in Safari, but only when no text fields of any kind are active.

Thanks

1 Like

I am assuming it's not possible to detect the cursor being inside a text field. But if there's a way, I sure would love this to setup single key shortcuts myself!

As a workaround which I use currently, you can use Keyboard Sequence instead and use double keys like ,, or >> which is still faster than 2 key shortcuts. The trick is finding characters you'd not usually type twice together and setting the time between them in the sequence to be as small as possible so it triggers only when you do it super quick leaving you with an option still to type it twice if absolutely required.

Unfortunately there is no reliable way to do this.

For some apps you can try to do it with conditional activation groups like this:

However not all apps label their textfields correctly, thus BTT can't know when a text field or text area is active (especially in cross platform apps). Also sometimes macOS doesn't update the focused element role fast enough...

1 Like

Ok, thanks for the prompt replies and ideas!

Sorry for digging out old topic, but [can't come up with an excuse].

How do I do this? I want to try this solution for single key shortcuts (that the app uses itself, so maybe they do name their texts fields correctly), because when I'm in a text field, I can't use these letters I want to use for shortcuts, unless I want to capitalize them…
@Andreas_Hegenberg

Edit:
I tried my best but ain't working and is crushing BTT on top of that…
image

Advanced Conditions of the trigger:
image

Focused UI Element Inspector: