Archive for June, 2007|Monthly archive page
Mac OS X: Keyboard shortcuts to launch any application
Some of the search queries that land people on this blog seem to be looking for shortcuts for applications. With Mac OS X 10.4, you don’t need to create or even learn shortcuts for applications. They’re already there, but not in the form you may be expecting.
The key is Spotlight, the search utility built into OS X. Spotlight makes a decent application launcher. Just hit the Spotlight keyboard shortcut (Command+spacebar unless you changed it), type the first few letters of the application’s name, and if the application’s name is the Top Hit, press Return to launch it. (In OS X 10.4, you need to press Command+Return; In 10.5, Apple simplified it to just Return.) If it isn’t the Top Hit, use the usual Spotlight shortcuts to get to it in the list: Use the up and down arrow keys either alone, or with the Command key to jump categories.
So for example, if I want to use Activity Monitor, I press Command+spacebar, then type “act” and boom, there it is. Depending on which files and applications are on your computer, Activity Monitor may appear before you get to the third letter.
If you’re annoyed because you have to type a few letters before Spotlight narrows it down to the application you want to launch, have patience. At least in my experience, if you keep picking the same item from the search results, OS X will eventually turn it into the Top Hit, and over time you’ll need to type fewer and fewer characters to get it. (You can accelerate searching for multiple words through abbreviation; read about it here.)
By now I’ve got my Mac trained so that after pressing the Spotlight shortcut, Safari becomes the Top Hit as soon as I type “sa”, and Photoshop shows up as soon as I type “ph”. Yeah, it’s more than a single keystroke, but on the other hand, to get this feature I didn’t have to modify my system, spend an hour configuring shortcuts, or add a utility such as LaunchBar. Spotlight is already capable of launching any application on your system without any further setup.
There’s a second benefit to leaning on Spotlight for this purpose: You never have to dig down to open an application or utility that isn’t already in the Dock. You don’t even need to know where it is in your hard disk! Using Spotlight as an application launcher can also let you reduce the number of application alias icons littering your desktop or Dock.
Of course, if you really do want to manually define system shortcuts, you can open System Preferences, click Keyboard & Mouse, click Keyboard Shortcuts, and edit the list of shortcuts.
And yes, before OS X 10.4 came out with Spotlight, I used to be a devotee of LaunchBar, and I tried Quicksilver. The problem is that even if a launcher app is free, the second indexing engine drags on the system and adds complexity, another database to store and manage, and removes another set of keyboard shortcuts from the pool. When Spotlight came out, I realized that it does most of what I need, and well enough. The things Spotlight can’t do that the other utilities can do I’ve mostly covered by having Spotlight trigger AppleScripts…but that’s a subject for another entry.
Update: There are so many Web searches that come here looking for an Activity Monitor shortcut that I have to add this: If you frequently want to monitor Mac system status information, you should download iStat menus and simply have all of that CPU, RAM, disk, network, etc. information right up there in your menu bar. Ultimately, iStat menus is why I don’t need to open Activity Monitor.
Microsoft Office 2004 for Mac: Free a stuck Help window
The Microsoft Office Help window’s title bar can sometimes get stuck under the menu bar. When that happens, you can’t move the Help window, and you can’t close it because the close button is part of the title bar. Because the Help window is more like a palette than a window, it doesn’t respond to any Close Window keyboard shortcut or the arrangement commands under the Window menu, and it floats above all other windows. It basically blocks your document window until you restart the application.
Short answer
Throw out the file com.microsoft.Office.prefs.plist, or if you want to be more precise, instead of throwing out that file, open it and increase the value for Help/Help_Top so that it clears the menu bar.
Long answer
Or, how I figured this out:
The usual suggestion for a problem like this is to delete an application’s Preferences file. I didn’t want to throw out the Preferences file because I’ve heavily customized my Office installation (toolbars, etc.) and I didn’t want to reconfigure everything from scratch. I suspected that there must be a setting in a preferences file somewhere that controls the position of the Help window, and if I could change that one thing I wouldn’t have to throw out the baby with the bathwater. And so I went looking for that setting.
First I tried AppleScript. I used the Script Editor to open the AppleScript dictionary for Excel, where I was having the problem, but I couldn’t find any commands that controlled the Help window.
I then started looking in the Preferences folder, in my Home/Library folder. You can read these files in TextEdit, but it’s nicer to use the free utility Pref Setter, which lets you view and edit the contents of a preferences file in a clean, easy, point-and-click way. I guess you could also use your favorite XML utility.
Now to find that window preference:
I looked in the file com.microsoft.excel.plist, but found nothing that looked right. While many Microsoft and Adobe applications have a preference (.plist) file at the top level of the Preferences folder, it turns out that these usually contain only information for the Open and Save dialog boxes. The real preferences files are usually buried deeper. But how was I going to find it? I typed “excel” into the Find field in Pref Setter’s Open Domain Quickly window, and it revealed a list of files inside the Preferences folder with Excel in the title.
Unfortunately, I still didn’t find what I was looking for. I thought to myself, maybe it isn’t specific to Excel…if it’s Help, maybe it’s an Office-wide preference. To test that, I typed “microsoft” into Pref Setter’s Find field and it turned up many more files, including some in a Microsoft sub-folder.
I opened com.microsoft.Office.prefs.plist. It’s a long list of preferences, and I wasn’t sure I could find the one I wanted. But there’s a Find field in the com.microsoft.Office.prefs.plist window, so I typed “help” into it to try and narrow down the list.
Aha! That revealed several preference settings:
Assistant\AsstWithHelp
Help\Help_Bottom
Help\Help_Left
Help\Help_LeftPaneWidth
Help\Help_Right
Help\Help_Top
Help\Help_ZoomedOut
Bingo.
Help\Help_Top was set to 22. I was pretty sure that was a vertical offset from the top of the screen, and guessed that if I set that to a much higher number, the window would move down. I changed the number to 100, saved the document, started Excel, and opened Excel Help.
Fixed!!!
I hope this serves as an example of how to locate application preference settings with the help of a utility like Pref Setter.
Comments (11)
Comments (7)