KM pixels vs. Retina Display pixels

I’m creating a new macro for Safari to resize & center the front window on my iMac 27" Retina display.

I started with a simple test, just setting the window size:

Resize Front Window to Pixels
To: 500 horizontally, 1000 vertically

When I measure a resized window with the PixelStick app, it’s 1000 x 2000 pixels. (PixelStick’s ruler corresponds to numbers of Retina pixels.)

Before I go ahead and double the dimensions in KM macros, I’d like a more complete understanding of the relation of KM screen positions and dimensions on both Retina and standard displays.

From the wiki https://wiki.keyboardmaestro.com/function/SCREEN:

SCREEN sizes and positions are in “points” (so a retina screen will typically have half as many points as pixels).

1 Like

OK. I can understand that using Points instead of Pixels results in KM macros that behave the same on standard resolution and Retina displays.

To avoid confusing new users (like me), KM’s Resize a Window Action should say “Resize Front Window by Points” (not Pixels).

Will the KM developers see this note, or should I submit a formal bug report?

@peternlewis should probably see this, especially since I have now used his forum handle.

Meanwhile, I’ll take a look at the KM Wiki and see if I can make it more clear.

1 Like

OK, so, just to confirm, the Action should be like this:

Agreed?


EDIT:  2016-07-16 14:11 CT (Sat)

**The above screenshot is incorrect.**
See:

https://forum.keyboardmaestro.com/t/km-pixels-vs-retina-display-pixels/4221/11?u=jmichaeltx
2 Likes

The Wiki has been updated:
action:Manipulate a Window [Keyboard Maestro Wiki]

Please let me know if you have any comments, or it is not clear.

1 Like

Thanks @JMichaelTX for alerting Peter and updating the KM Wiki.

The Wiki pages currently say, “So a retina screen will have half as many points as pixels.”

At least once in the Wiki, I’d say something more explitict like, “On a standard resolution display, one point is the same as one pixel; on a Retina display, one point is two pixels.”

OK, good point. (pun intended) :wink:

Perhaps “resolution” is not the best term. Maybe “pixels/inch” as found a most displays.

At this point, it may be best to let @peternlewis decide the best phrasing, since he is the one who implemented the Actions. I’m out of my depth here.

1 Like

Does Apple use the term “Point” anywhere.

It is correct that Keyboard Maestro uses Nominal Resolution everywhere, where four retina pixels (2x2 square) is one nominal pixel.

But do people in general understand any meaning associated with “Points”?

I’m concerned if the action was Resize Front Window to Points few people would have any idea what that meant.

It’s customary for page layout apps (like Pages and InDesign) to specify text size & ruler dimensions in Points. In this realm, documents are rendered on devices with widely varying resolutions, from computer monitors to smartphones to hi-res color printers. So it’s essential to have a measuring unit that’s not based on pixels.

You could follow the model of Pages and InDesign by leaving “points” out of action names, field labels, etc. Instead, simply add a “pt” suffix to value fields.

Turns out that screenshot in my above post is incorrect.

Per Peter’s request, the Wiki has been updated:

https://wiki.keyboardmaestro.com/action/Manipulate_a_Window

2 Likes

Very easy to understand. Great job.

2 Likes