Mac OSX: Setting a keyboard shortcut for maximize/resize window (green jewel)

Posted by jeremyclarke on March 15, 2010 · General

I’ve been dreaming for a long time of a system-wide keyboard shortcut to maximize/resize the current window in OSX (windows-style, where the window fills the screen or not, rather than going to the dock). In pretty much every application the ‘Window’ menu item has Minimize (shunt to dock) and “Zoom” which resizes the window and has the same effect as the green “+” jewel in the window header. The Minimize item has the easy-to-use keyboard shortcut CMD+, while the Zoom item has no shortcut and no hint at how to get one.

EDIT (Sep 27, 2010): Based on my realizations about Firefox and NetBeans detailed below I now think this method is pretty insufficient for me and probably lots of other people. I have since tried the 13$ SizeUp application recommended by Martin Reisch in the comments. It is excellent and elegant and solves both the problems I had and ones I didn’t realize I had until they were solved. I recommend it whole-heartedly for those among us with big screens and small patience for window management.

divvy logo EDIT (Jan 24, 2012): Another commercial solution to this problem that has appeared is Divvy. I haven’t tried it yet simply because I have SizeUp working and already paid for it, but from what I’ve heard Divvy takes it to the next level by adding a slick graphical interface in addition to keyboard shortcuts, as well as letting you create infinite different resizes, whereas SizeUp limits you to preset ones. Divvy has a demo so you can try it for free.

I looked around and found some totally whacked out solutions involving applescript or bash scripting but finally found an incredibly simple and obvious method using System Prefs. I recommend it for everyone who is sick of using the mouse to hit the tiny green jewel.

Detailed steps to set a Maximize keyboard shortcut in Mac OSX 10.6

  • Launch System Preferences from the Apple menu
  • Go to Keyboard settings
  • Go to Keyboard Shortcuts tab at the top of the window.
  • Go to Application Shortcuts in the sidebar of the window.
  • Click the small + button
  • In the popup thing make sure ‘All Applications’ is selected for Application:
  • In the Menu Title box type in exactly: Zoom
  • In Keyboard Shortcut type in the shortcut. I recommend Command-Shift-M
  • Click Add button.
  • Restart each app you want it to work in.

Screenshot of the system prefs window where you set the keyboard shortcut

Note on restarting apps: These shortcuts work on an app-by-app basis so it will only work in a given application after the app is restarted. Thus if you restart your computer it will immediately work in all apps.

Note on choosing a shortcut: I chose Command+Shift+M (Command is the ‘apple key’) because it matches the Command+M keyboard shortcut for Minimize/send-to-dock and will be easy for me to remember. You can set it to another combination if you want, but think carefully as you don’t want it to be something that any other applications use or you might have strange results.

EDIT: Well don’t I look stupid. It turns out this keyboard shortcut doesn’t work with Firefox, the application I spend most of my time in! I thought it wasn’t working cause it needed to be restarted but that didn’t fix it either. The problem is that Firefox has its own menu item called “Zoom”, under the View menu, which doesn’t do anything but holds the page zooming functions inside it. For whatever reason this means that the configuration described above activates that menu item and stops the Window > Zoom menu item from working. GAH! I might have to try the app mentioned in the comments to find true happiness.

Posted by jeremyclarke on · General

23 Comments

  1. Martin Reisch

    awesome tip. the Keyboard Shortcuts customizability in Snow Leopard is fantastic. that being said, i’ve found much sanity in these two apps which take things a bit further:

    SIZEUP: http://www.irradiatedsoftware.com/sizeup/
    CINCH: http://www.irradiatedsoftware.com/cinch/

    one is the keyboard version, the other is the mouse drag version

    both indespensable and totally affordable. if you need to be able to (gulp, do what windows 7 can do) on your mac and snap two safari windows as 50% left and 50% right of your screen. or two finder windows…. ect.

    anyhow. great tip, just wanted to add these other options i found and am finding hard to be without them when using other peoples Macs!

    March 15th, 2010 at 2:22 pm

  2. Joey Mornin

    Great tip. The thing that still bugs me, though, is that the green jewel button doesn’t always maximize the window. In some apps, it just changes the window size. Is this different in Snow Leopard? Or do you know a workaround?

    March 15th, 2010 at 2:47 pm

  3. jeremyclarke

    Joey: I’ve actually noticed a total turnaround on green jewel in Snow Leopard. It seems to be totally undocumented in the HIG (the guidelines apple publishes) but as far as I can tell in 10.6 green jewel switches between full-window and previous-state, rather than the insanity it has wreaked in all other versions of OSX (making windows smaller than you’d ever want them, making them tall and thin or short and fat for no reason). That alone is worth the 35$ upgrade ;)

    March 18th, 2010 at 11:11 pm

  4. Joey Mornin

    Wow. I think you’re right–I’d pay $35 for that. Definitely my least favorite feature in OS X. Until now, hopefully!

    March 18th, 2010 at 11:13 pm

  5. SizeUp « Sound and Complete

    [...] keyboard shortcut for maximizing a window. All right, you can, sort-of. There are ways of assigning keyboard action that corresponds to the green (+) button that’s in the top left corner of every [...]

    January 31st, 2011 at 5:51 pm

  6. Svink

    you. are. a. god. thankyou.

    April 20th, 2011 at 8:14 am

  7. Pedro Gordo

    Thanks, mate! Really helpful!

    April 20th, 2011 at 2:51 pm

  8. Justin

    After reading a few pessimists who said it was impossible without third party software (which seems extreme and silly to me) I stumbled my way across this extremely elegant and useful nugget of gold. Thanks.

    May 26th, 2011 at 10:06 pm

  9. David

    Thanks – this really helped. I often use an external monitor and when I unplug it the windows end up in random places with the controls out of reach. Maximizing via keystroke fixes this.

    January 24th, 2012 at 5:09 am

  10. robert

    get WINDOWSHADE X 5.0.7

    I can’t live with out it

    February 28th, 2012 at 12:56 pm

  11. Fitz

    Excellent! Thanks.

    May 24th, 2012 at 10:27 am

  12. Lisovsky Vlad

    Thank you!

    June 3rd, 2012 at 4:21 pm

  13. sho

    well, in Lion it doesnt work

    July 6th, 2012 at 2:46 pm

  14. jeremyclarke

    Sho: I still have the shortcut set up and it still works for me in Lion (and based on other comments it sounds like plenty of other people have gotten it to work). Maybe you followed the steps wrong?

    July 27th, 2012 at 10:37 am

  15. Pete

    Thanks Jer! Just what I was looking for.

    August 8th, 2012 at 1:18 pm

  16. Insik

    Thanks, Mountain Lion works fine.

    September 10th, 2012 at 3:33 am

  17. Jan S

    Hi Jeremy
    Having been a long time laptop user since 2000 – mostly Microsoft windows OS – not by choice but as per my employers provision of a laptop – I finally decided 3 weeks ago to purchase a Macbook Air 11″ and overall have found the conversion to be a very pleasant experience……EXCEPT for this problem of maximizing the windows on a Mac.

    Now that I’ve found your simple solution and implemented it it works flawlessly and has made my life far better. Thank you for your clear and concise advice.

    October 19th, 2012 at 3:53 am

  18. twnaing

    I like the feature of hyperdock ($9.99). It has both mouse and keyboard methods.

    December 25th, 2012 at 12:03 pm

  19. Lena

    This one’s free and works like a charm…
    http://www.macupdate.com/app/mac/30591/right-zoom

    January 6th, 2013 at 5:34 pm

  20. Top 10 Tweaks for the MacBook - Joseph D. Purcell

    [...] from being able to do this, even if it is OS X. Fortunately, after scouring the internet I found a post by Jeremy Clark that shows how to make a shortcut, and it’s super simple. (There is also a [...]

    January 15th, 2013 at 1:22 pm

  21. Konst

    Works fine on Lion after restarting the system, thanks!

    January 19th, 2013 at 3:46 pm

  22. me

    Thank you! Works great!!!!

    January 10th, 2014 at 1:34 am

  23. Felix

    Thanks a ton

    much better and simpler than all the obscure apps…

    March 28th, 2014 at 9:40 am

Add new comment (email only seen by Jeremy)