There are several ways to configure shortcuts in OSX.

In app shortcuts

Some apps have internal preferences to set certain shortcuts. Some of this shortcuts will only work in the context of the app, some others will be global shortcuts

Application Shortcuts in the System Preferences

In
System Preferences > Kayboard > Keyboard Shortcuts > Application Shortcuts we can assign shortcuts to the actions of an app upper menu bar and the context menu (right-click menu). It is as simple as knowing the exact label of the menu button, and assigning a shortcut to it.

I usually use this to assign “⌥⌘→” and “⌥⌘←” to the “next tab” and “previous tab” buttons, to navigate apps that implement something similar to tabs.

This is a very handy add to show in a single modal window all the menu bar shortcuts available in the active app. Simply long-press ⌘.

http://www.grandtotal.biz/CheatSheet/

Services

Services are Automator scripts which are usually from the context menu (right clicking on any “standard” interface element like text, files, etc.).

This is mostly useful to perform operations in selected text, or in selected files and folders in Finder.

You can find how to create a workflow in this article (or simply Google it, there are tons or tutorials):

http://thenextweb.com/lifehacks/2011/06/07/how-to-create-mac-os-x-services-with-automator/

To assign a shortcut to a Service, go to
System Settings > Keyboard > Keyboard Shortcuts > Services.

This will assign the shortcut to every place where it is available when right clicking.

If you want to assign a different shortcut for that service in an specific all, or only have said shortcut active in an app, you can add it using the previous method nº2 using the name of the service as Menu Title

Special system shortcuts

Some system shortcuts can be modified under System Preferences > Keyboard Shortcuts, but there are some special system shortcuts which are difficult to modify.

Most of them live in a special PLIST file located in ~/Library/Preferences/com.apple.symbolichotkeys.plist. The values inside the plist are somewhat cryptical, since this file is not meant to be edited by the user.

Some people have done a thorough investigation on those files to find which plist keys correspond to which actions, and which plist values correspond to which keyboard keys.

http://www.krypted.com/?p=6250

http://hintsforums.macworld.com/showthread.php?t=114785

The information is not updated for OSX 10.8, so you will have to do some trial and error to find newer hotkeys.

There might be other ways to customise shortcuts, but I think these methods let you assign shortcuts to all possible actions in all possible situations. If you find a shortcut you’re not able to set, I’d love to hear about it. Please leave a comment and I’ll try to help you.

Besides being able to set shortcuts, sometimes it is useful to know all the current shortcuts that are available at any given time (including app shortcuts, global shortcuts, system shortcuts, etc.). If anyone knows a way to do this, please leave a comment.