Change the Finder's shortcut keys

Mar 04, '02 09:39:03AM

Contributed by: muji

When you use the Finder's shortcuts often, you may want to change some of them to better suit your needs. For example, I did not like the shortcut for the 'back' button in a Finder window. By default it is command [, and I wanted to change this to command B' which is the current shortcut to hide or show the toolbar.

Read the rest of the article for a quick how-to on editing Finder shortcuts...

[Editor's caution: Although not overly difficult, if you're not yet comfortable with the terminal, root privileges, and UNIX file permissions, I would recommend holding off on this hint. You do not want to mess up key files used by the Finder! I have not tried this hint myself.]

The Finder shortcuts are stored in a 'Localized.rsrc' file, and that is in binary format, so you will need HexEdit or another hex editor. You can change the shortcuts in this way:

  1. Open a terminal window and become the root user by typing su. Enter your root password when asked.

  2. CD to the location of the file and make a backup for safekeeping:
    % cd /System/Library/CoreServices/Finder.app
    % cd /Contents/Resources/English.lproj/
    cp Localized.rsrc Localized.bak
  3. Copy the file to another location so you can modify on the copy:
    cp Localized.rsrc ~/Desktop/
  4. Modify the permissions on the desktop copy of the file:
    chmod 777 ~/Desktop/Localized.rsrc
  5. Leave the terminal window open and then switch to the Finder and open the file in HexEdit to search (command+F) for the command you want to change.

  6. Replace the value with a key you wish to use; values will look something like this:
    New Finder Window . N
    Replace the character(s) after the shortcut name(s) with the one(s) you like.

  7. Save the file & switch back to the terminal then copy and overwrite the original while resetting the permissions:
    cp ~/Desktop/Localized.rsrc Localized.rsrc
    chmod 644 Localized.rsrc
  8. Log out or restart the machine
That's it; your Finder shortcuts have been changed. I succesfully applied this hack on a PowerBook G3 and a PowerMac G4 both running 10.1.2.

Comments (9)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020304093903824