How to change Caps Lock key behavior in OS X
If you never use your Caps Lock key in OS X, you can disable or even repurpose it.
Many would say Caps Lock is one of the more useless keys on the keyboard, especially given its relatively large size and convenient location that makes it easy to inadvertently press. If the only time you use the key deliberately is to turn Caps Lock back off after hitting it inadvertently, you may wish to disable or use the key for alternative purposes.
Some programs (especially games) offer custom key assignment routines that can manage the Caps Lock key, among others, but of course application-specific changes will not address the issue globally.
If you would like to disable the Caps Lock key, you can do so using Apple's Keyboard system preferences. In this preferences pane, select the Keyboard tab, and then click the "Modifier Keys..." button. In the drop-down pane that appears, select your attached keyboard, and then change the Caps Lock key to "No Action" to disable it. You can also switch it to function as a Control, Option, or Command key.
Unfortunately this feature does not allow the key to be reassigned to perform the functions of other special keys like Delete, Escape, or the Fn key, or for use in key combinations. To remap the key in this way you will need to use a third-party program.
One such option is the free program PCKeyboardHack, which will allow you to enter a custom key code for the Caps Lock key (or other key on your keyboard), and thereby change its function. This program is available for OS X 10.4 through 10.8, and is free "donationware" that you can install and try out.