Have worked with Apple Support and we believe there is a problem with Keyboard Maestro and Firefox and MacOS .
Using a MacBookPro 16’ with 2 exteernal monitors.
OS 26.5.5 was 26.5.1 this morning.
Used KM yesterday and created some F keys.
Had some issues but got them fixed.
This morning FKeys did not work.
Fixed issues.
Started a new macro (4th) and the following happens.
Click inside of Firefox and mouse immediately goes to the Apple logo on the laptop screen.
If I take the mouse and move to any firefox window (on 3 monitors) the same happens.
at the Apple logo the “mouse” is clicked so when I move sideways the menus I move over activate.
If I click one of those menus (second click action) the menu disappears and now the mouse functions normally.
As to your macro the problem is with the use of absolute position as it is a fixed coordinate on your overall screen space.
macOS treats all connected monitors as one giant coordinate grid:
(0,0) is usually the top-left corner of the primary display
x increases to the right
y increases downward
So:
(0,10) means:
0 pixels from the left edge
10 pixels down from the top edge
That location is at or on the Apple menu/logo area in the menu bar.
So this macro is effectively:
Move the mouse to the top-left corner of the screen
Click there
That explains the behavior described above:
when triggered in Firefox,
the cursor jumps to the Apple logo/menu area,
and clicks it.
With multiple displays, the coordinate system spans all monitors.
Examples:
A monitor to the left of the main screen may have negative X coordinates
A monitor above may have negative Y coordinates
So an “absolute” click always goes to the same global screen coordinate regardless of:
which app is active
where the window is
where the mouse currently is
With that you want to try relative positioning rather than *absolute positioning where relative position can be:
current mouse location
front window
screen center
image found on screen
etc.
Example:
“Click 20 px right of current mouse position”
“Click center of front window”
You can use the “Get” button to capture the current mouse position and fills in the desired coordinates automatically. So if you:
move the cursor somewhere,
press “Get”,
Keyboard Maestro records that exact screen coordinate as the desired position.
Would be helpful to include in your post exactly what you are trying to achieve and the macro so that we can test it and fix it for you,
You likely want something like the below [NOTE: Use the Get button to get the desired coordinates] where the frontmost window will be Firefox based on your trigger conditions:
The shown macro was just started and you are seeing the first steps of many.
The other 3 macros are running fine with absolute positioning as other choices did not seem to work right. The other macros have similar parts as the one visible on screen and they work fine.
The problem occurred when I started the fourth macro.
The issue does not happen with Safari or Chrome.
When I get back on my laptop tomorrow I will take a screen shot of the other macros.
One macro wakes up Firefox and the windows that are to be used.
The other macros put an input (Stock symbol) into 3 different Firefox browser windows and starts their programming to obtain information about a stock.
The fourth macro was going to extract data from those 3 windows and put into Excel for viewing so I don’t have to write it down. (Time saving when evaluating a stock for a trade)
The macro you posted will activate any time you make Firefox frontmost OR press F9—is that really the intent? I can't think of any use case where you'd want the mouse to always jump to the top left corner of the display and click each and every time you activated Firefox.
ㅤ
Griffman - That macro that you see was the start. It was added and when I went to get the mouse location it started doing the Apple logo dance. I have similiar steps in the other macros with no problem. This macro WAS just getting set up! AND it does not affect Safari or Chrome just Firefox!
Your answer doesn't address my question at all: That macro is set to run every time you activate Firefox. Switch from Firefox to another app, then back to Firefox? The macro runs. I do not believe that is the behavior you want, is it?
If it is, then the macro—regardless of how much more of it you haven't shown—is behaving perfectly. The macro fires when Firefox activates (or you hit F9), so it then does the very first step in the macro: Moves the mouse to the top left corner and clicks the button.
I cannot believe that is the trigger you want—because it will run every single time you switch back into Firefox.
Here are my three other macros with similar actions.
This macro inputs a stock symbol into 3 different windows and their fields for the first entry of the day. One window changes after an input is entered
You have my sympathies. Most, if not all, of us have been there, in one way or another. I have fought my way through the weeds to go the long way around the barn only find out that there was a built-in way to do what I was trying to do -- and it was mentioned in the first answer to my question which I had skimmed over.
Which is why this forum is so awesome - in is full of people who will very patiently explain how to do something, even after they very patiently explained how to do that exact thing several times earlier.
That attitude and behaviour is very much appreciated by me!
We all take time to get the hang of new things and sometimes miss the forrest for the trees.