Detect when a text editable screen component has the focus.

What I want is to be able to conditionally fire a trigger if the screen component the has the current focus is text editable (like a text editor or an input in na form).

Would that be possible?