Conditional Activation Group based on cursor type (to better detect text areas)

It would be super hip to be able to have shortcuts behave differently in a text input vs otherwise, which I know is kind of dicey with the Focused Element Role. I wonder if a better way would be polling for the current system icon and comparing to the iBeam NSCursor type to indicate you're in an editable text area?
Apple Docs

this just covers the mouse cursor, i.e. it’d only work if your mouse is hovering the textfield :frowning:

Indeed. The main thrust of my research on this was trying to make a sane middle-click solution. I want it to paste if I'm in a text field, but do whatever else it's supposed to do (open links in new tabs, close tabs, etc.) if it's not.

But yeah, it's probably somewhat niche, but also wouldn't be too much work to add it as an additional condition (I don't think). I tried to make it work with a simple command line utility, but unfortunately the API doesn't work if you don't have a window object for some reason. I guess I could draw a transparent window or something, but it'd be much more helpful to have it as a conditional group choice :slight_smile:

I’ll have a look! (window snapping is using a similar trick to prevent snapping when the resizing cursor is active)

1 Like


I think this would be really helpful. I like assigning shortcuts like right or left arrow in certain apps. however, I really don't want them to be invoked if I'm in a text field (or in spotlight or alfred)