Mouse location off by -25 on the Y-axis on a 5k monitor

Hi all.

New user here coming over from AutoHotKeys for Windows. I am noticing a -25 mouse location discrepancy on the y-axis when creating Move or Click Mouse command. I am on a MacPro with a 5k LG Monitor.

Any suggestions about how to correct this so that my mouse click can hit their target without have to adjust thing numerically?



Do you have two monitors? What is your monitor arrangement in the System Preferences, Displays ➤ Arrangement settings?

The coordinates are relative to the top left corner of the menu bar in that arrangement.

Thanks for responding, Peter. Yes. I have two monitors with the 5k monitor being the primary monitor independent of the other 16:9 monitor.

I have attached a screen shot of my monitor config.

What is puzzling is the problem is on the y-axis. I have to adjust the y-axis -25 (moving the point up toward the top of the screen) to hit the target.

Any thoughts?

The origin of the display is the top left corner of the display with the “menu bar” on it. For your arrangement, that makes it the top left corner of the right hand monitor. Also shown is the fact that the left monitor is slightly below the top of the right monitor (presumably by 25 pixels). So the top left corner of the left monitor will be something like x = -1024, y = 25.

What action are you using, and where are you getting the coordinates that you have to adjust by -25. Keyboard Maestro will return any absolute coordinates relative to the top right corner of the right screen, with negative x coordinates for positions on the left screen. But you should not have to adjust them. However if you are getting the coordinates yourself from somewhere else, then you will have to take in to account the location of the left screen in the desktop coordinate system.

You can adjust the positions of the screens to line them up, and you can move the menu bar in the arrangement by dragging it to the other monitor.

Traditionally the menu bar appeared only on one screen, and that was the one that showed up with the menu bar in the Display preferences. Modern OS X displays the menu bar on all screens, and so it is often less clear which one is the “main” screen, but it does make a difference as far as the overall display coordinate system is concerned.

I am only using the righthand monitor with the menu bar for mouse coordinate acquisition and those coordinates are being acquired with the "Get Mouse Location" (%CurrentMouse%) macro when the mouse is hovering over the exact target location.
I have moved the lefthand monitor up to be even with the righthand monitor and will see if that makes a difference tomorrow morning. I will also look into how my software program screen is populated the monitor. That might be the problem.


I tried to duplicate this with my monitors set up in the same arrangement:

But I could not. The %CurrentMouse% appeared to correctly track the mouse location, with 0,0 being the top left corner of the right screen, and the coordinates on the left screen being negative X and somewhat positive Y at the top of the screen.

Get and Go buttons in Mouse Click action both worked as expected.