Trigger Action on position of Curser

Is it possible to trigger an action at the current location of the curser? For example, I trigger a Key Sequence action, which starts with a right click. This right-click currently starts at the location of the mouse/. However, I want it to start at the location of the curser.

Thanks!
Craig

unfortunately in general the answer is no. macOS doesn’t provide a way to get the location of the text cursor.

You can always try the „show context menu for selected element“ action, but not all apps/elements support that.

@Craig_D Do you mean if the cursor is in a text, but the mouse is somewhere?

@Frank1 Yes, precisely.

Good, then you can try if a (stupid) workaround works for you.

The cursor is somewhere in a text and you want to right-click there.

  1. add/paste a rare “character” that is not in the text (there are many of them: Ç ¿ ≈ ∂ ∆).
  2. search for this character.
  3. move the mouse to this character.
  4. delete the character
  5. right click

Delays where necessary

Depending on what exactly you want to do, something like this could work.

The sequence of actions could looks like this.

1 Like

Haha, interesting approach that seems to work astonishingly well :-p best insert some emoji that is easy to recognize for BTT :rocket:

Why are you astonished that BTT works? :wink:

FYI: Apple finally introduced a proper API for opening context menus at the current cursor position in macOS 15 Sequoia.

1 Like

That's great news! Keep me in the loop, please. :nerd_face:

@Craig_D Have you tried the "Move mouse to position" action? It has the option to move it relative to the text cursor. It doesn't work in all apps, but for instance, in Safari or TextEdit, it is pretty precise. The emoji workaround is great @Frank1! I will use it.

1 Like

@Jossse Thanks! Good to know.

1 Like