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.


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!