[ # ] Set a Keyboard Shortcut for Maximize Button on Mac OS

/* Posted October 6th, 2008 at 8:29am */
/* Filed under Apple, Apps, How-To, Mac */

While you can easily minimize any window on Mac OS with a command-M keyboard shortcut, there’s no such built-in shortcut for the maximize action. In fact, the maximize capability in Mac OS has long been one of the major drawbacks compared to Windows, though many Mac users claim that a Windows-like full window maximize isn’t necessary due to how Mac users use their Macs. I’m going to have to beg to differ, the maximize button really ought to maximize the windows and do no less. While it’s slightly annoying that the maximize button doesn’t really maximize anything, at the very least you don’t have to live without a keyboard shortcut to activate it.

Creating a keyboard shortcut for maximize is actually quite an easy task, requiring just one external (but free) application–Quicksilver. First thing’s first, though; you’ll have to create an AppleScript to do the actual maximize. Quicksilver will simply allow you then to assign a keyboard shortcut to the script.

To create an AppleScript, launch AppleScript in Applications -> AppleScript -> Script Editor. Copy and paste the code below and close the editor. It will prompt you to save the script. Remember the script name and location for later.

tell application "System Events"
if UI elements enabled then
set FrontApplication to (get name of every process whose frontmost is true) as string
tell process FrontApplication
click button 2 of window 1
--button 2 is the green "zoom" button for all applications
--window 1 is always the frontmost window.
end tell
else
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
display dialog "UI element scripting is not enabled. Check 'Enable access for assistive devices'"
end tell
end if
end tell

Now download and install Quicksilver. When it completes, start it up. Press command-’ to open up the trigger dialog. Click the small “+” button at the bottom to add a hotkey trigger. Drag the AppleScript you created over to the “Select an item” box. Then close the window.

Once the trigger is created, you’ll see it appear on the trigger menu. Now double click on the newly created trigger to get the dialog to actually assign a hotkey to it.

A double click will spawn a window to the right. To assign a hotkey, click on the Edit button and then enter in the hotkey combination you’d like to use. Try command-option-something to minimize overwriting any existing hotkey shortcuts.

You’ll need to enable GUI scripting mode in AppleScript to enable the Quicksilver script. To do so you can simply execute your new keyboard shortcut combination and you’ll be prompted to enable it. Otherwise go to Applications -> AppleScript -> AppleScript Utility and set it there.

Also make sure that Quicksilver gets started up when you boot up Mac OS otherwise you’ll have to launch it yourself to enable the maximize hotkey. Simply enter the preferences and select “Start at login.”

  • Digg
  • del.icio.us
  • Propeller
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Mixx
  • NewsVine
  • Blogsvine
  • Facebook
  • Google
  • TwitThis


Related Posts

Leave a Reply


*


* (not published, used to display your gravatar)



(* required)

Anything Geeky Goes!

Highlights

Featured Wii

Featured iPhone

Featured PSP/PS3

Featured A/V

Related Links

Archives

Products Highlight


Featured Sites

Categories

Subscribe

Recent Posts

Commentors

Other Links