Friday, February 16, 2007

Tip: Renaming a file in Mac OS X Finder with a keyboard shortcut

It took me 3 years to find this shortcut, but it may be obvious to you :). A co-worker, new to OS X, asked me how to rename a file. In Windows, hitting F2 on a file immediately enters rename mode. I told him the two ways I knew of:
  1. Delay Click on the file name
  2. CMD-I for the Info window and rename there

So he was a little disappointed, a strike against OS X! A few minutes later, talk about good timing, I just stumbled upon it through an accidental keystroke press:
  1. Select file
  2. Press Enter or Return

OMG! Here's why it took me 3 years to figure this out. In Windows, hitting Return when anything is selected will try to do the default Widnows Explorer action, like Open the file in it's default application. This is kind of an expensive penalty for accidentally hitting Enter on the keyboard so you just kind of stay away from it unless you are absolutely sure you want to take the default action on whatever you have selected.

Incidentally, I ran the following Google query and the top hit, Dan Rodney - Mac OS X Keyboard Shortcuts doesn't mention this gem, nor does the second hit, Apple's Mac OS X Keyboard Shortcuts documentation. First mention of it I see is in the first comment on a article on how to rename using the mouse to activate edit mode. Hard to believe this is not widely known, but it sure isn't widely documented.