Mouse Click a Certain Area to Trigger a Macro

I wish to assign a missing function to an app. Is it possible to trigger a macro by clicking (or e.g. option-clicking) a specific area (defined by coordinates) of an application window.
Are there any macro examples available, which do similar things, and which I could possibly modify?
Thank you in advance.

Hi @rls and welcome to the Forum.

It would be good to know what Application you are talking about and what it is you want the "click" to achieve.

I don't think there is such a trigger as "click in a defined area" but I am sure there are other ways to achieve your goal with Keyboard Maestro.

There are many things (including gestures and images) that can trigger Macros. It is very rare that a task is not possible using Keyboard Maestro :grinning:

Hello Zabobon,
The application is Reunion 13, a genealogy program. You can download a free trial version from

I have dozens of ideas, how to add more automation to the app. Here are three of them
Idea 1:
Currently: Ctrl-click on Persons Name copies „Full Name, Birth and Death Details“ to clipboard
My KM-wish: Shift-Ctrl-clicking on Persons Name should copy „Full Name, Birth and Death Details“ to the clipboard and subsequently update the Meta-Data-details of the preferred TIFF/JPG-image of the same person

Idea 2:
Currently: the user can enter a source with a double click to edit it.
My KM-wish: option- double-clicking should automatically refresh the sources template with the latest sources settings

Idea 3:
Currently: clicking the clipboard icon in the sources window copies the preview of the source to the clipboard
My KM-wish: option-clicking the clipboard icon should copy the preview of the source to the clipboard and subsequently update the Meta-Data-details of the attached multi-media source PDF/JPG/TIFF-image(s).

May be you have an idea how to achieve this.
Best regards

KM does NOT provide Macro Triggers based on a mouse click, except when used as a USB Device Key trigger.

I don't see any way to trigger based on where you click, but you could add modifiers to the USB Device Key.

If that Device Key is indeed on your mouse, then AFTER the Macro was triggered, you could get the mouse position using the token CurrentMouse token. That provides the absolute screen coordinates of the mouse. Perhaps you could then use that to determine if it is in the target area of your app. This is doable, but will require some complex calculations to determine if the mouse is within the target area.

If it were me, I'd look for other Triggers .

I'd suggest you to take a look into the Conflict Palette , much more practical, and it would also help you organize all your macros in one place. Just assign the same keystroke trigger, ie "Ctrl-Shift-T" to all the relevant macros.
(Conflict Palette IMO is a confusing name for such an useful Keyboard Maestro feature)

if you still want to go the route of a Trigger when Mouse is clicked inside certain area, something to get started:


A good starting point with making a Macro in Keyboard Maestro to do this sort of thing is to first analyse exactly the current steps you have to go through to do this without any automation help.

For example, if you find that selecting something, then choosing a menu command and then pressing a key stroke achieves the task - you can automate that in Keyboard Maestro by stringing those things together (an Action to replace each step). Once the Macro is working there are many ways to trigger it. Probably best to get the Macro working first and then worry about the trigger.


Thanks for your help.

Hello Regular,

Thanks for your help.

1 Like

Hello Zabobon,
Thanks for your help.

1 Like