I am using OSX 10.9.1. What keyboard shortcut will simulate the maximize and minimize functions that you normally find on the top left corner of the screen? I've read some of the other questions on superuser about this but they are all relatively old What updates were released for macos x that make this now possible without 3rd party add-ons?

Best Answer


Assign a shortcut to the zoom menu item or whatever it is called in your locale from system preferences

If you want the shortcut to always maximize a window to fill a screen, you can use for example Spectacle .

Or add a line like this to ~/.slate with Slate .

bind m:cmd;shift move screenOriginX;screenOriginY screenSizeX;screenSizeY

I have used FastScripts to assign a shortcut to this script.

try
    tell application "Finder" to set b to bounds of window of desktop
    try
        tell application (path to frontmost application as text)
            set bounds of window 1 to {item 1 of b, 22, item 3 of b, item 4 of b}
        end tell
    on error
        tell application "System Events" to tell window 1 of (process 1 where it is frontmost)
            try
                set position to {0, 22}
                set size to {item 3 of b, (item 4 of b) - 22}
            on error
                click (button 1 of window 1 where subrole is "AXZoomButton")
            end try
        end tell
    end try
end try

When you tell system events to change the position and size via the accessibility api there is a noticeable delay between when the position and size are changed Telling the application to change the limits of a window is faster but it doesn't work with all applications Other applications such as slate and moom always use the api accessibility