Resizing from the Center / Symmetrically, or Maintaining Aspect Ratio

A built-in behavior of window resizing in macOS is holding option while dragging from the corner, where it resizes anchored by the center, rather than being anchored to the opposite corner. In other words, from whatever corner you drag from, the window expands or shrinks from the opposite corner as well. It’s a similar behavior to a lot of design software.

Another variation is that if you hold option and shift when dragging the corner, it basically scales the window, maintaining the aspect ratio, but anchored by the center.

I’ve tried replicating this behavior with the various resizing and moving actions, but it doesn’t seem possible.

I’m not sure how BTT handles the resizing under the hood, if it’s sending simulated events to the window to trigger window resizing, in which case adding the option and shift+option modifiers seems feasible, or if it’s using a private API, or just the Accessibility API, in which case that behavior might have to be replicated manually by anchoring the window by its center, or adding the change in x and y of the mouse to the width, as well as changing the position of the window in the opposite direction by the same amount.

Either way, would it be possible to implement those behaviors as options in the “Moving & Resizing Modifier Keys” setting?

I imagine in the settings it could either be a toggle for “anchor center”, “symmetric resize”, or something along those lines. Or it could be a separate setting, where you could set one set of modifier keys for the default behavior, and another for the center-anchored / symmetrical resizing.

Personally, this functionality would be super convenient!

The problem ist that this looks really bad (at least the last time I tried it) because the accessibility API's don't allow to simultaneously resize & reposition. But I could probably add some option to enable it :wink:

Ah yeah, that was my concern when I was considering scripting it with the Accessibility APIs, I figured it could be kind of clunky. It might make more sense to be a separate setting with it’s own modifiers then, so you can use both? If you get the chance though, I’d still use it just for the convenience, thanks!