rxhanson / Rectangle

Move and resize windows on macOS with keyboard shortcuts and snap areas
https://rectangleapp.com
Other
25.69k stars 767 forks source link

Cannot set CMD+W shortcut to maximize windows #1471

Open Valent1 opened 1 week ago

Valent1 commented 1 week ago

macOS version: 15.0 (24A335) Rectangle version: v0.83 (89)

I have used Spectacle for a very long time, and one of my favorite shortcuts was CMD+W to Maximize a window. Spectacle automatically overrides the OS, so CMD+W does not closes windows anymore, and it instead maximizes windows.

This cannot be reproduced in Rectangle. Is that intended, or is that a limitation of the app? I have tried to add custom keyboard shortcuts in App Shortcuts, to modify the shortcut for 'Close' and 'Close Window' setting them to something different than CMD+W. Still, Rectangle won't allow me to register CMD+W to maximize windows. It almost feels like the CMD+W shortcut is "forbidden" somehow.

I know I could set anything else to maximize windows in Rectangle, like CMD+Shift+W for instance, but muscle memory is really hard to undo! Besides, I think it's worth looking into this and why this is happening.

rxhanson commented 1 week ago

This is a precedent set by the shortcut recorder used in Rectangle to not remap cmd+w. I don't have plans to change this at this time.

You can work around it by exporting the config and editing the entry for "maximize" to be

      "keyCode" : 13,
      "modifierFlags" : 1048576

Then importing it back in.

Valent1 commented 3 days ago

That worked, thank you!