Karabiner (KeyRemap4MacBook) is a powerful utility for keyboard customization.